Explicitly check for pthread library, and link against it. stable-2.0
authorRyan C. Gordon <icculus@icculus.org>
Tue, 23 Oct 2012 14:37:52 -0400
branchstable-2.0
changeset 1308ef4eaec5b8e2
parent 1307 f94eec5e9054
child 1314 305e3c4985d1
Explicitly check for pthread library, and link against it.
CMakeLists.txt
     1.1 --- a/CMakeLists.txt	Mon Oct 22 23:41:04 2012 -0400
     1.2 +++ b/CMakeLists.txt	Tue Oct 23 14:37:52 2012 -0400
     1.3 @@ -170,6 +170,11 @@
     1.4          IF(HAVE_PTHREAD_H)
     1.5              SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE)
     1.6          ENDIF(HAVE_PTHREAD_H)
     1.7 +
     1.8 +        FIND_LIBRARY(PTHREAD_LIBRARY pthread)
     1.9 +        IF(PTHREAD_LIBRARY)
    1.10 +            SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} ${PTHREAD_LIBRARY})
    1.11 +        ENDIF(PTHREAD_LIBRARY)
    1.12      ENDIF(BEOS)
    1.13  ENDIF(UNIX)
    1.14