summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-16 07:22:09 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-16 07:22:09 -0700
commit5ecf4650b477d9184f91b4f0e1351abc69775cc1 (patch)
tree1fc08f4f8f7bcdce45493c523b2041014fc83895 /CMakeLists.txt
parent1f0bf92a3474009b44e750b96646b3bb0d865c2e (diff)
downloadsubsurface-5ecf4650b477d9184f91b4f0e1351abc69775cc1.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
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})