Fix shortcut saving on KDE, and use the system dialog for Frameworks
[quassel.git] / src / uisupport / CMakeLists.txt
index 32664cf..37ea311 100644 (file)
@@ -1,49 +1,63 @@
 # Builds the uisupport module
 
-set(QT_DONT_USE_QTGUI 0)
-set(QT_USE_QTNETWORK 1)
-include(${QT_USE_FILE})
-
 set(SOURCES
+    aboutdata.cpp
     abstractbuffercontainer.cpp
     abstractitemview.cpp
+    action.cpp
+    actioncollection.cpp
+    bufferhotlistfilter.cpp
     bufferview.cpp
     bufferviewfilter.cpp
+    bufferviewoverlayfilter.cpp
     clearablelineedit.cpp
+    clickable.cpp
+    clickablelabel.cpp
     colorbutton.cpp
-    nickviewfilter.cpp
-    inputline.cpp
+    contextmenuactionprovider.cpp
+    flatproxymodel.cpp
+    fontselector.cpp
+    graphicalui.cpp
+    multilineedit.cpp
+    networkmodelcontroller.cpp
     nickview.cpp
+    nickviewfilter.cpp
+    qssparser.cpp
+    resizingstackedwidget.cpp
     settingspage.cpp
+    styledlabel.cpp
     tabcompleter.cpp
+    toolbaractionprovider.cpp
     uisettings.cpp
-    uistylesettings.cpp)
-
-set(HEADERS
-    abstractbuffercontainer.h
-    abstractitemview.h
-    bufferview.h
-    bufferviewfilter.h
-    clearablelineedit.h
-    colorbutton.h
-    nickviewfilter.h
-    inputline.h
-    nickview.h
-    settingspage.h
-    tabcompleter.h)
-
-if(SPUTDEV)
-  set(SOURCES ${SOURCES} uistyle.cpp)
-  set(HEADERS ${HEADERS} )
-else(SPUTDEV)
-  set(SOURCES ${SOURCES} old-uistyle.cpp)
-  set(HEADERS ${HEADERS} )
-endif(SPUTDEV)
-
-qt4_wrap_cpp(MOC ${HEADERS})
+    uistyle.cpp
+
+    # needed for automoc
+    abstractnotificationbackend.h
+)
+
+if (WITH_KDE4)
+    include_directories(${KDE4_INCLUDES})
+    add_definitions(-DHAVE_KDE ${KDE4_DEFINITIONS})
+    set(SOURCES ${SOURCES} kcmdlinewrapper.cpp)
+endif()
 
 include_directories(${CMAKE_SOURCE_DIR}/src/common
-                    ${CMAKE_SOURCE_DIR}/src/client)
+                    ${CMAKE_SOURCE_DIR}/src/client
+)
+
+if (USE_QT5)
+    list(APPEND qt_modules Widgets)
+endif()
+
+add_library(mod_uisupport STATIC ${SOURCES})
+qt_use_modules(mod_uisupport Core Gui Network ${qt_modules})
+
+target_link_libraries(mod_uisupport mod_client mod_common)
+
+if (WITH_KDE4)
+    target_link_libraries(mod_uisupport ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBRARY})
+endif()
 
-add_library(mod_uisupport STATIC ${SOURCES} ${MOC})
-add_dependencies(mod_uisupport mod_common mod_client)
+if (WITH_KF5)
+    target_link_libraries(mod_uisupport KF5::CoreAddons KF5::TextWidgets KF5::XmlGui)
+endif()