Providing proper defaults for nick and realname on Mac OS using CoreServices
[quassel.git] / src / common / CMakeLists.txt
index 7807157..fae257d 100644 (file)
@@ -11,18 +11,25 @@ set(SOURCES
     buffersyncer.cpp
     bufferviewconfig.cpp
     bufferviewmanager.cpp
-    global.cpp
+    cliparser.cpp
     identity.cpp
+    ircchannel.cpp
+    ircuser.cpp
     logger.cpp
     message.cpp
+    network.cpp
+    quassel.cpp
     settings.cpp
     signalproxy.cpp
     syncableobject.cpp
-    util.cpp
-    network.cpp
-    ircuser.cpp
-    ircchannel.cpp
-    cliparser.cpp)
+    util.cpp)
+
+if(CMAKE_HOST_WIN32)
+    set(SOURCES ${SOURCES} logbacktrace_win.cpp)
+endif(CMAKE_HOST_WIN32)
+if(CMAKE_HOST_UNIX)
+    set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
+endif(CMAKE_HOST_UNIX)
 
 set(MOC_HDRS
     aliasmanager.h
@@ -41,18 +48,25 @@ set(MOC_HDRS
     syncableobject.h)
 
 set(HEADERS ${MOC_HDRS}
+    abstractcliparser.h
     bufferinfo.h
-    global.h
+    cliparser.h
     logger.h
     message.h
     types.h
-    util.h
-    cliparser.h)
+    util.h)
+
+if(APPLE)
+  set(SOURCES ${SOURCES} mac_utils.cpp)
+  set(HEADERS ${HEADERS} mac_utils.h)
+endif(APPLE)
 
 qt4_wrap_cpp(MOC ${MOC_HDRS})
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})  # for version.inc and version.gen
-add_definitions(-DHAVE_VERSION_GEN)  # we ensure that by deps in the main CMakeLists.txt
 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