1 # - Try to find libpthread
3 # Once done this will define
5 # LIBPTHREAD_FOUND - system has libpthread
6 # LIBPTHREAD_INCLUDE_DIRS - the libpthread include directory
7 # LIBPTHREAD_LIBRARIES - Link these to use libpthread
8 # LIBPTHREAD_DEFINITIONS - Compiler switches required for using libpthread
10 # Redistribution and use is allowed according to the terms of the New
12 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
16 if (LIBPTHREAD_LIBRARIES AND LIBPTHREAD_INCLUDE_DIRS)
17 set (LIBPTHREAD_FIND_QUIETLY TRUE)
18 endif (LIBPTHREAD_LIBRARIES AND LIBPTHREAD_INCLUDE_DIRS)
20 find_path (LIBPTHREAD_INCLUDE_DIRS NAMES pthread.h)
21 find_library (LIBPTHREAD_LIBRARIES NAMES pthread)
23 include (FindPackageHandleStandardArgs)
24 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBPTHREAD DEFAULT_MSG
25 LIBPTHREAD_LIBRARIES LIBPTHREAD_INCLUDE_DIRS)
27 mark_as_advanced(LIBPTHREAD_INCLUDE_DIRS LIBPTHREAD_LIBRARIES LIBPTHREAD_FOUND)