Only check for pthread library if pthread.h was found.

This commit is contained in:
Ryan C. Gordon 2012-11-25 21:52:36 -05:00
parent 06edd385fc
commit 8156bd219c
1 changed files with 4 additions and 5 deletions

View File

@ -176,11 +176,10 @@ if(UNIX)
check_include_file(pthread.h HAVE_PTHREAD_H)
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})
find_library(PTHREAD_LIBRARY pthread)
if(PTHREAD_LIBRARY)
set(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} ${PTHREAD_LIBRARY})
endif()
endif()
endif()
endif()