From: Manuel Nickschas Date: Tue, 24 Nov 2009 12:18:49 +0000 (+0100) Subject: Fix building with the GNU Gold linker X-Git-Tag: 0.5.2~15 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=4eefef0bf9cb4e2509adce172ed29e56f19e3754 Fix building with the GNU Gold linker Thanks to Thomas Müller (DeepDiver) for providing the patch. Fixes #863. --- diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index f36d00e8..9d0af6ee 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -72,6 +72,16 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}) # for vers set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES version.gen) add_library(mod_common STATIC ${SOURCES} ${MOC}) + if(APPLE) target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation") -endif(APPLE) \ No newline at end of file +endif(APPLE) + +if(CMAKE_HOST_UNIX) + find_library(libdl dl) + if (libdl-NOTFOUND) + message(FATAL_ERROR "Cannot find required library: libdl") + endif (libdl-NOTFOUND) + + target_link_libraries(mod_common ${libdl}) +endif(CMAKE_HOST_UNIX)