aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-11-23 12:23:50 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-16 08:01:16 -0800
commit9079701176ad196fa96ad2624592bade86d2702e (patch)
tree6720a5c01803093728c47fc0908e5afc12cd802c /CMakeLists.txt
parent320cfccd71d87a88ddb272096fd54d064c128508 (diff)
downloadsubsurface-9079701176ad196fa96ad2624592bade86d2702e.tar.gz
Move adding -lpthread
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 4 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27128888b..289843551 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,8 +158,11 @@ set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIB
# set up the different target platforms
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(SUBSURFACE_TARGET subsurface)
+ # add pthread to the end of the library list on Linux
+ # this is only needed on Ubuntu
+ # but shouldn't hurt on other Linux versions
# in some builds we appear to be missing libz for some strange reason...
- set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lz)
+ set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lz -lpthread)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
execute_process(
@@ -209,13 +212,6 @@ if(FBSUPPORT)
set(FACEBOOK_INTEGRATION facebook_integration)
endif()
-# add pthread to the end of the library list on Linux
-# this is only needed on Ubuntu (why do these idiots break everything?)
-# but shouldn't hurt on other Linux versions
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT ANDROID)
- set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lpthread)
-endif()
-
# create the executables
if(SUBSURFACE_MOBILE)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")