Quellcode durchsuchen

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

Ryan C. Gordon vor 13 Jahren
Ursprung
Commit
06edd385fc
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  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()