cipher implementation
[quassel.git] / src / common / CMakeLists.txt
index 30eed02..e297558 100644 (file)
@@ -1,4 +1,7 @@
 # Builds the common module
+if (QCA2_FOUND)
+    include_directories(${QCA2_INCLUDE_DIR})
+endif (QCA2_FOUND)
 
 set(QT_DONT_USE_QTGUI 1)
 set(QT_USE_QTNETWORK 1)
@@ -28,6 +31,11 @@ set(SOURCES
     syncableobject.cpp
     util.cpp)
 
+if (QCA2_FOUND)
+    set(SOURCES ${SOURCES}
+        cipher.cpp)
+endif (QCA2_FOUND)
+
 if(CMAKE_HOST_WIN32)
     set(SOURCES ${SOURCES} logbacktrace_win.cpp)
 endif(CMAKE_HOST_WIN32)
@@ -63,6 +71,11 @@ set(HEADERS ${MOC_HDRS}
     types.h
     util.h)
 
+if (QCA2_FOUND)
+    set(HEADERS ${HEADERS}
+        cipher.h)
+endif (QCA2_FOUND)
+
 if(APPLE)
   set(SOURCES ${SOURCES} mac_utils.cpp)
   set(HEADERS ${HEADERS} mac_utils.h)
@@ -79,6 +92,10 @@ if(APPLE)
   target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
 endif(APPLE)
 
+if (QCA2_FOUND)
+  target_link_libraries(mod_common ${QCA2_LIBRARIES})
+endif (QCA2_FOUND)
+
 if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
   find_library(libdl dl)
   if(NOT libdl MATCHES "NOTFOUND")