aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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")