From 5ecf4650b477d9184f91b4f0e1351abc69775cc1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 16 Apr 2015 07:22:09 -0700 Subject: cmake: add extra -lpthread to fix Ubuntu builds We shouldn't need this. Ubuntu is once again broken. What else is new. But since this shouldn't hurt any of the sane Linux version, I'll just add it for any Linux flavor. Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f6d7132f..e8d4a22c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,6 +290,13 @@ TARGET_LINK_LIBRARIES(subsurface_generated_ui ${QT_LIBRARIES}) ADD_LIBRARY(subsurface_interface STATIC ${SUBSURFACE_INTERFACE}) TARGET_LINK_LIBRARIES(subsurface_interface ${QT_LIBRARIES} ${MARBLE_LIBRARIES}) +# 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") + SET(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lpthread) +endif() + # create the executables ADD_EXECUTABLE(${SUBSURFACE_TARGET} ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES}) -- cgit v1.2.3-70-g09d2