Commit 9938429b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 44d23b1b
......@@ -8,9 +8,10 @@ set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_
project(cervisia VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION "5.2.0")
set(QT_MIN_VERSION "5.15.0")
set (KDE_COMPILERSETTINGS_LEVEL "5.82.0")
find_package(ECM 1.3.0 REQUIRED NO_MODULE)
find_package(ECM 5.90.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
add_definitions(-DTRANSLATION_DOMAIN="cervisia")
......@@ -26,7 +27,7 @@ include(ECMSetupVersion)
ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX CERVISIA VERSION_HEADER cervisia_version.h)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets DBus)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets DBus)
find_package(KF5 REQUIRED COMPONENTS I18n Parts DocTools Init IconThemes Notifications WidgetsAddons ItemViews Su TextWidgets)
......@@ -64,10 +65,10 @@ set(libcervisia_SRCS
debug.cpp
)
qt5_add_dbus_interfaces( libcervisia_SRCS cvsservice/org.kde.cervisia5.cvsservice.xml )
qt5_add_dbus_interfaces( libcervisia_SRCS cvsservice/org.kde.cervisia5.cvsjob.xml )
qt5_add_dbus_interfaces( libcervisia_SRCS cvsservice/org.kde.cervisia5.cvsloginjob.xml )
qt5_add_dbus_interfaces( libcervisia_SRCS cvsservice/org.kde.cervisia5.repository.xml )
qt_add_dbus_interfaces( libcervisia_SRCS cvsservice/org.kde.cervisia5.cvsservice.xml )
qt_add_dbus_interfaces( libcervisia_SRCS cvsservice/org.kde.cervisia5.cvsjob.xml )
qt_add_dbus_interfaces( libcervisia_SRCS cvsservice/org.kde.cervisia5.cvsloginjob.xml )
qt_add_dbus_interfaces( libcervisia_SRCS cvsservice/org.kde.cervisia5.repository.xml )
ki18n_wrap_ui(libcervisia_SRCS settingsdialog_advanced.ui )
......@@ -124,13 +125,13 @@ set(cervisiapart_PART_SRCS ${libcervisia_SRCS}
)
qt5_add_dbus_adaptor(cervisiapart_PART_SRCS org.kde.cervisia5.protocolview.xml protocolview.h ProtocolView)
qt_add_dbus_adaptor(cervisiapart_PART_SRCS org.kde.cervisia5.protocolview.xml protocolview.h ProtocolView)
add_library(cervisiapart5 MODULE ${cervisiapart_PART_SRCS})
target_link_libraries(cervisiapart5 KF5::I18n KF5::TextWidgets KF5::Parts KF5::Notifications KF5::ItemViews)
install(TARGETS cervisiapart5 DESTINATION ${PLUGIN_INSTALL_DIR} )
install(TARGETS cervisiapart5 DESTINATION ${KDE_INSTALL_PLUGINDIR} )
########### next target ###############
......@@ -138,20 +139,20 @@ install(TARGETS cervisiapart5 DESTINATION ${PLUGIN_INSTALL_DIR} )
########### install files ###############
install(PROGRAMS org.kde.cervisia.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install(PROGRAMS org.kde.cervisia.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install(FILES org.kde.cervisia.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
install(FILES org.kde.cervisiapart5.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install(FILES cervisiapart.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install(FILES org.kde.cervisiapart5.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} )
install(FILES cervisiapart.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} )
install(FILES cervisiaui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/cervisiapart )
install(FILES cervisiashellui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/cervisia )
install(FILES cervisia.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
install(FILES cervisia.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR} )
ecm_install_icons(ICONS
16-apps-cervisia.png
22-apps-cervisia.png
32-apps-cervisia.png
48-apps-cervisia.png
DESTINATION ${ICON_INSTALL_DIR}
DESTINATION ${KDE_INSTALL_ICONDIR}
THEME hicolor
)
......
......@@ -10,20 +10,20 @@ set(cvsservice_bin_KDEINIT_SRCS
cvsloginjob.cpp
../debug.cpp)
qt5_add_dbus_adaptor(cvsservice_bin_KDEINIT_SRCS org.kde.cervisia5.cvsservice.xml cvsservice.h CvsService)
qt_add_dbus_adaptor(cvsservice_bin_KDEINIT_SRCS org.kde.cervisia5.cvsservice.xml cvsservice.h CvsService)
qt5_add_dbus_adaptor(cvsservice_bin_KDEINIT_SRCS org.kde.cervisia5.cvsloginjob.xml cvsloginjob.h CvsLoginJob)
qt_add_dbus_adaptor(cvsservice_bin_KDEINIT_SRCS org.kde.cervisia5.cvsloginjob.xml cvsloginjob.h CvsLoginJob)
qt5_add_dbus_adaptor(cvsservice_bin_KDEINIT_SRCS org.kde.cervisia5.repository.xml repository.h Repository)
qt_add_dbus_adaptor(cvsservice_bin_KDEINIT_SRCS org.kde.cervisia5.repository.xml repository.h Repository)
qt5_add_dbus_adaptor(cvsservice_bin_KDEINIT_SRCS org.kde.cervisia5.cvsjob.xml cvsjob.h CvsJob)
qt_add_dbus_adaptor(cvsservice_bin_KDEINIT_SRCS org.kde.cervisia5.cvsjob.xml cvsjob.h CvsJob)
kf5_add_kdeinit_executable(cvsservice_bin ${cvsservice_bin_KDEINIT_SRCS} NOGUI)
set_target_properties(cvsservice_bin PROPERTIES OUTPUT_NAME cvsservice5)
target_link_libraries(kdeinit_cvsservice_bin Qt5::Widgets Qt5::DBus KF5::KIOCore KF5::I18n KF5::WidgetsAddons KF5::Su KF5::DBusAddons KF5::ConfigCore)
target_link_libraries(kdeinit_cvsservice_bin Qt::Widgets Qt::DBus KF5::KIOCore KF5::I18n KF5::WidgetsAddons KF5::Su KF5::DBusAddons KF5::ConfigCore)
set_target_properties(kdeinit_cvsservice_bin PROPERTIES OUTPUT_NAME kdeinit5_cvsservice)
install(TARGETS kdeinit_cvsservice_bin ${INSTALL_TARGETS_DEFAULT_ARGS} )
......@@ -35,7 +35,7 @@ install(TARGETS cvsservice_bin ${INSTALL_TARGETS_DEFAULT_ARGS} )
kf5_add_kdeinit_executable(cvsaskpass cvsaskpass.cpp)
target_link_libraries(kdeinit_cvsaskpass Qt5::Widgets KF5::WidgetsAddons KF5::CoreAddons KF5::I18n)
target_link_libraries(kdeinit_cvsaskpass Qt::Widgets KF5::WidgetsAddons KF5::CoreAddons KF5::I18n)
install(TARGETS kdeinit_cvsaskpass ${INSTALL_TARGETS_DEFAULT_ARGS} )
......@@ -44,10 +44,10 @@ install(TARGETS cvsaskpass ${INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
install( FILES org.kde.cvsservice5.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES org.kde.cvsservice5.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} )
install( FILES org.kde.cervisia5.cvsjob.xml
org.kde.cervisia5.cvsservice.xml
org.kde.cervisia5.repository.xml
org.kde.cervisia5.cvsloginjob.xml
DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} )
......@@ -29,6 +29,6 @@ ecm_install_icons(ICONS
sc-actions-vcs-remove-cvs-cervisia.svgz
sc-actions-vcs-status-cvs-cervisia.svgz
sc-actions-vcs-update-cvs-cervisia.svgz
DESTINATION ${ICON_INSTALL_DIR}
DESTINATION ${KDE_INSTALL_ICONDIR}
THEME hicolor
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment