Checking whether a initSetMethod exists before bluntly invoking it. (fixes a new...
[quassel.git] / src / common / CMakeLists.txt
index f36d00e..30eed02 100644 (file)
@@ -7,6 +7,7 @@ include(${QT_USE_FILE})
 set(SOURCES
     aliasmanager.cpp
     backlogmanager.cpp
+    basichandler.cpp
     bufferinfo.cpp
     buffersyncer.cpp
     bufferviewconfig.cpp
@@ -37,6 +38,7 @@ endif(CMAKE_HOST_UNIX)
 set(MOC_HDRS
     aliasmanager.h
     backlogmanager.h
+    basichandler.h
     buffersyncer.h
     bufferviewconfig.h
     bufferviewmanager.h
@@ -72,6 +74,14 @@ 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_SYSTEM_NAME STREQUAL "Linux")
+  find_library(libdl dl)
+  if(NOT libdl MATCHES "NOTFOUND")
+    target_link_libraries(mod_common ${libdl})
+  endif(NOT libdl MATCHES "NOTFOUND")
+endif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")