2 # This module finds an installed PThread using the variable PTHREAD_ROOT_DIR
4 # It sets the following variables:
5 # PTHREAD_FOUND - set to true if PThread is found
6 # PTHREAD_INCLUDE_DIR - the directory where the include files are located
7 # PTHREAD_LIBRARIES - the path to PThread library
9 # The file "pthread.h" is looked for PTHREAD_INCLUDE_DIR.
10 # Libraries are searched with following names:
19 #############################################################
20 # Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
22 # This library is free software; you can redistribute it and/or
23 # modify it under the terms of the GNU Lesser General Public
24 # License as published by the Free Software Foundation; either
25 # version 2.1 of the License, or (at your option) any later version.
27 # This library is distributed in the hope that it will be useful,
28 # but WITHOUT ANY WARRANTY; without even the implied warranty of
29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 # Lesser General Public License for more details.
32 # You should have received a copy of the GNU Lesser General Public
33 # License along with this library; if not, write to the Free Software
34 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
36 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
39 IF(NOT PThread_FIND_QUIETLY)
40 MESSAGE(STATUS "Looking for PThread...")
44 SET(PTHREADS_INCLUDE_TO_FIND pthread.h)
45 FIND_PATH(PTHREAD_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND})
46 FIND_LIBRARY(PTHREAD_LIBRARIES NAMES pthreadVC2 pthreadVC2d)
48 FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h)
49 FIND_LIBRARY(PTHREAD_LIBRARIES NAMES pthread)
52 INCLUDE(FindPackageHandleStandardArgs)
53 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PThread REQUIRED_VARS PTHREAD_INCLUDE_DIR PTHREAD_LIBRARIES)
56 IF(NOT PThread_FIND_QUIETLY)
57 MESSAGE(STATUS "PThread library: ${PTHREAD_LIBRARIES}")