Sfoglia il codice sorgente

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

Ryan C. Gordon 13 anni fa
parent
commit
06edd385fc
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      CMakeLists.txt

+ 5 - 0
CMakeLists.txt

@@ -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()