X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2FCMakeLists.txt;h=c2c747bb3823bd0c8ef4159c8a086c724d418055;hp=e69660600e097d2b4cb71125a656c90c275e8ccc;hb=3d3a6b8d34b9d0ab3a2502936c49c0d0d5e91617;hpb=24acf1efa9e91c58d9e64d76e03e7683ac0ac889 diff --git a/src/qtui/CMakeLists.txt b/src/qtui/CMakeLists.txt index e6966060..c2c747bb 100644 --- a/src/qtui/CMakeLists.txt +++ b/src/qtui/CMakeLists.txt @@ -1,21 +1,5 @@ # Builds the qtui module -set(_modules ) - -if(WITH_QT5) - list(APPEND _modules Widgets) -endif(WITH_QT5) - -if(HAVE_DBUS) - list(APPEND _modules DBus) -endif(HAVE_DBUS) - -if(HAVE_WEBKIT) - list(APPEND _modules Webkit XmlPatterns) -endif(HAVE_WEBKIT) - -setup_qt_variables(Gui Network ${_modules}) - set(SOURCES aboutdlg.cpp awaylogfilter.cpp @@ -55,6 +39,7 @@ set(SOURCES qtuimessageprocessor.cpp qtuisettings.cpp qtuistyle.cpp + receivefiledlg.cpp settingsdlg.cpp settingspagedlg.cpp simplenetworkeditor.cpp @@ -64,59 +49,8 @@ set(SOURCES titlesetter.cpp topicwidget.cpp verticaldock.cpp - webpreviewitem.cpp) - -set(MOC_HDRS - aboutdlg.h - awaylogfilter.h - awaylogview.h - bufferwidget.h - channellistdlg.h - chatitem.h - chatlinemodel.h - chatmonitorfilter.h - chatmonitorview.h - chatscene.h - chatview.h - chatviewsearchbar.h - chatviewsearchcontroller.h - columnhandleitem.h - coreconfigwizard.h - coreconnectdlg.h - coreconnectionstatuswidget.h - coreinfodlg.h - debugbufferviewoverlay.h - debugconsole.h - debuglogwidget.h - debugmessagemodelfilter.h - inputwidget.h - ircconnectionwizard.h - legacysystemtray.h - mainpage.h - mainwin.h - markerlineitem.h - msgprocessorstatuswidget.h - nicklistwidget.h - qtui.h - qtuiapplication.h - qtuimessageprocessor.h - qtuistyle.h - settingsdlg.h - settingspagedlg.h - simplenetworkeditor.h - systemtray.h - systraynotificationbackend.h - taskbarnotificationbackend.h - titlesetter.h - topicwidget.h - verticaldock.h) - -set(HEADERS - chatline.h - chatlinemodelitem.h - chatviewsettings.h - qtuisettings.h - webpreviewitem.h) + webpreviewitem.cpp +) set(FORMS aboutdlg.ui @@ -140,51 +74,43 @@ set(FORMS settingsdlg.ui settingspagedlg.ui simplenetworkeditor.ui + receivefiledlg.ui topicwidget.ui) if(HAVE_KDE) set(SOURCES ${SOURCES} knotificationbackend.cpp) - set(MOC_HDRS ${MOC_HDRS} knotificationbackend.h) else(HAVE_KDE) + if(HAVE_SNORENOTIFY) + set(SOURCES ${SOURCES} snorenotificationbackend.cpp) + set(FORMS ${FORMS} snorentificationconfigwidget.ui) + endif(HAVE_SNORENOTIFY) if(HAVE_PHONON) set(SOURCES ${SOURCES} phononnotificationbackend.cpp) - set(MOC_HDRS ${MOC_HDRS} phononnotificationbackend.h) set(FORMS ${FORMS} phononnotificationconfigwidget.ui) include_directories(${PHONON_INCLUDES}) endif(HAVE_PHONON) endif(HAVE_KDE) -if(HAVE_DBUS) - set(SOURCES ${SOURCES} statusnotifieritem.cpp statusnotifieritemdbus.cpp dockmanagernotificationbackend.cpp) - set(MOC_HDRS ${MOC_HDRS} statusnotifieritem.h statusnotifieritemdbus.h dockmanagernotificationbackend.h) - set(FORMS ${FORMS}) - if(WITH_QT5) - qt5_add_dbus_interface(DBUS ../../interfaces/org.kde.StatusNotifierWatcher.xml statusnotifierwatcher) - qt5_add_dbus_interface(DBUS ../../interfaces/org.freedesktop.Notifications.xml notificationsclient) - qt5_add_dbus_adaptor(DBUS ../../interfaces/org.kde.StatusNotifierItem.xml statusnotifieritemdbus.h StatusNotifierItemDBus) - else(WITH_QT5) - qt4_add_dbus_interface(DBUS ../../interfaces/org.kde.StatusNotifierWatcher.xml statusnotifierwatcher) - qt4_add_dbus_interface(DBUS ../../interfaces/org.freedesktop.Notifications.xml notificationsclient) - qt4_add_dbus_adaptor(DBUS ../../interfaces/org.kde.StatusNotifierItem.xml statusnotifieritemdbus.h StatusNotifierItemDBus) - endif(WITH_QT5) +if (HAVE_DBUS) + set(SOURCES ${SOURCES} statusnotifieritem.cpp statusnotifieritemdbus.cpp dockmanagernotificationbackend.cpp) + qt_add_dbus_interface(DBUS ../../interfaces/org.kde.StatusNotifierWatcher.xml statusnotifierwatcher) + qt_add_dbus_interface(DBUS ../../interfaces/org.freedesktop.Notifications.xml notificationsclient) + qt_add_dbus_adaptor(DBUS ../../interfaces/org.kde.StatusNotifierItem.xml statusnotifieritemdbus.h StatusNotifierItemDBus) endif(HAVE_DBUS) if(HAVE_SSL) set(SOURCES ${SOURCES} sslinfodlg.cpp) - set(MOC_HDRS ${MOC_HDRS} sslinfodlg.h) set(FORMS ${FORMS} sslinfodlg.ui) endif(HAVE_SSL) if(INDICATEQT_FOUND) set(SOURCES ${SOURCES} indicatornotificationbackend.cpp) - set(MOC_HDRS ${MOC_HDRS} indicatornotificationbackend.h) set(FORMS ${FORMS} indicatornotificationconfigwidget.ui) include_directories(${INDICATEQT_INCLUDE_DIRS}) endif(INDICATEQT_FOUND) if(HAVE_NOTIFICATION_CENTER) set(SOURCES ${SOURCES} osxnotificationbackend.mm) - set(MOC_HDRS ${MOC_HDRS} osxnotificationbackend.h) endif() foreach(FORM ${FORMS}) @@ -195,15 +121,11 @@ endforeach(FORM ${FORMS}) include(settingspages/settingspages.cmake) foreach(SP ${SETTINGSPAGES}) set(SPSRC ${SPSRC} settingspages/${SP}settingspage.cpp) - set(SPHDR ${SPHDR} settingspages/${SP}settingspage.h) set(SPFRM ${SPFRM} settingspages/${SP}settingspage.ui) endforeach(SP ${SETTINGSPAGES}) foreach(SRC ${SP_SOURCES}) set(SPSRC ${SPSRC} settingspages/${SRC}) endforeach(SRC ${SP_SOURCES}) -foreach(HDR ${SP_HEADERS}) - set(SPHDR ${SPHDR} settingspages/${HDR}) -endforeach(HDR ${SP_HEADERS}) foreach(FRM ${SP_FORMS}) set(SPFRM ${SPFRM} settingspages/${FRM}) endforeach(FRM ${SP_FORMS}) @@ -213,16 +135,24 @@ include_directories(${CMAKE_SOURCE_DIR}/src/common ${CMAKE_SOURCE_DIR}/src/qtui ${CMAKE_SOURCE_DIR}/src/qtui/settingspages ${CMAKE_SOURCE_DIR}/src/uisupport - ${CMAKE_CURRENT_BINARY_DIR} - ${QUASSEL_QT_INCLUDES}) -if(WITH_QT5) - qt5_wrap_ui(UI ${FORMPATH} ${SPFRM}) -else(WITH_QT5) - qt4_wrap_cpp(MOC ${MOC_HDRS} ${SPHDR}) - qt4_wrap_ui(UI ${FORMPATH} ${SPFRM}) -endif(WITH_QT5) +) + +qt_wrap_ui(UI ${FORMPATH} ${SPFRM}) + +if (USE_QT5) + list(APPEND qt_modules Widgets) +endif() + +if (HAVE_DBUS) + list(APPEND qt_modules DBus) +endif() + +if (HAVE_WEBKIT) + list(APPEND qt_modules Webkit XmlPatterns) +endif() + +add_library(mod_qtui STATIC ${SOURCES} ${SPSRC} ${DBUS} ${UI}) +qt_use_modules(mod_qtui Core Gui Network ${qt_modules}) -add_library(mod_qtui STATIC ${SOURCES} ${SPSRC} ${MOC} ${DBUS} ${UI} ${HEADERS}) add_dependencies(mod_qtui mod_common mod_client mod_uisupport) -set_target_properties(mod_qtui PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_COMPILEFLAGS}")