Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-11-15 18:46:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2014-11-15 18:46:30 +0300
commiteb515f4dc88ed8a1ad13f3127791cced5fbfe8b3 (patch)
tree594f8fcb7eb14771102b1ab1c259965e9d22d6c5 /CMakeLists.txt
parentc1e48c0ff085f9f575dc596c9e97f5f67137c8a6 (diff)
CMake: cleanup, use find_package for pthreads
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b2e5b95663..34657888cc0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1070,7 +1070,14 @@ if(UNIX AND NOT APPLE)
endif()
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
- list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm -lpthread)
+ list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm)
+
+ find_package(Threads REQUIRED)
+ list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT})
+
+ if(CMAKE_DL_LIBS)
+ list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
+ endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
if(NOT WITH_PYTHON_MODULE)
@@ -1080,11 +1087,6 @@ if(UNIX AND NOT APPLE)
endif()
endif()
- set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -pthread")
- if(CMAKE_DL_LIBS)
- list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
- endif()
-
# lfs on glibc, all compilers should use
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)