Only check for pthread library if pthread.h was found.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 25 Nov 2012 21:52:36 -0500
changeset 1318 5488d36ff8b5
parent 1317 4ea85d1717b0
child 1319 cd8f44ef6b38
Only check for pthread library if pthread.h was found.
CMakeLists.txt
--- a/CMakeLists.txt	Sun Nov 25 21:51:43 2012 -0500
+++ b/CMakeLists.txt	Sun Nov 25 21:52:36 2012 -0500
@@ -176,11 +176,10 @@
         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()