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>
This commit is contained in:
Dirk Hohndel 2015-04-16 07:22:09 -07:00
parent 1f0bf92a34
commit 5ecf4650b4

View file

@ -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})