From stable-2.0: explicitly check for pthread library, and link against it.

This commit is contained in:
Ryan C. Gordon 2012-11-25 21:51:43 -05:00
parent 7be76515a5
commit 06edd385fc
1 changed files with 5 additions and 0 deletions

View File

@ -177,6 +177,11 @@ if(UNIX)
if(HAVE_PTHREAD_H)
set(PHYSFS_HAVE_THREAD_SUPPORT TRUE)
endif()
find_library(PTHREAD_LIBRARY pthread)
if(PTHREAD_LIBRARY)
set(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} ${PTHREAD_LIBRARY})
endif()
endif()
endif()