Explicitly check for pthread library, and link against it.

This commit is contained in:
Ryan C. Gordon 2012-10-23 14:37:52 -04:00
parent ca561d6bef
commit 783d661bf8
1 changed files with 5 additions and 0 deletions

View File

@ -170,6 +170,11 @@ IF(UNIX)
IF(HAVE_PTHREAD_H)
SET(PHYSFS_HAVE_THREAD_SUPPORT TRUE)
ENDIF(HAVE_PTHREAD_H)
FIND_LIBRARY(PTHREAD_LIBRARY pthread)
IF(PTHREAD_LIBRARY)
SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} ${PTHREAD_LIBRARY})
ENDIF(PTHREAD_LIBRARY)
ENDIF(BEOS)
ENDIF(UNIX)