From 9079701176ad196fa96ad2624592bade86d2702e Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 23 Nov 2015 12:23:50 -0200 Subject: Move adding -lpthread Signed-off-by: Tomaz Canabrava --- CMakeLists.txt | 12 ++++-------- 1 file 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") -- cgit v1.2.3-70-g09d2