Commit 2783ee8f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 309f786a
......@@ -35,7 +35,7 @@ include(KDEGitCommitHooks)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED
Core
DBus
Network
......@@ -170,8 +170,8 @@ if(TAGLIB_FOUND)
set(HAVE_Taglib 1)
endif()
find_package(Phonon4Qt5)
set_package_properties(Phonon4Qt5
find_package(Phonon4Qt${QT_MAJOR_VERSION})
set_package_properties(Phonon4Qt${QT_MAJOR_VERSION}
PROPERTIES
TYPE OPTIONAL
PURPOSE "Required for KTorrent's multimedia plugin"
......
......@@ -6,7 +6,7 @@ set_target_properties(ktorrent_app PROPERTIES
set(ktorrent_dbus_SRC)
set(powermanagementinhibit_xml ${KTORRENT_DBUS_XML_DIR}/org.freedesktop.PowerManagement.Inhibit.xml)
qt5_add_dbus_interface(ktorrent_dbus_SRC ${powermanagementinhibit_xml} powermanagementinhibit_interface)
qt_add_dbus_interface(ktorrent_dbus_SRC ${powermanagementinhibit_xml} powermanagementinhibit_interface)
target_sources(ktorrent_app PRIVATE
${ktorrent_dbus_SRC}
......@@ -122,10 +122,10 @@ target_link_libraries(ktorrent_app
)
install(TARGETS ktorrent_app ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.ktorrent.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install(PROGRAMS org.kde.ktorrent.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install(FILES ktorrentui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/ktorrent )
install(FILES kttorrentactivityui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/ktorrent )
install(FILES ktorrent.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR} )
install(FILES ktorrent.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR} )
install(FILES org.kde.ktorrent.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
add_subdirectory(icons)
......@@ -57,6 +57,6 @@ ecm_install_icons(ICONS
sc-actions-kt-set-max-download-speed.svgz
sc-actions-kt-set-max-upload-speed.svgz
sc-actions-kt-speed-limits.svgz
DESTINATION ${ICON_INSTALL_DIR}
DESTINATION ${KDE_INSTALL_ICONDIR}
THEME hicolor
)
......@@ -2,7 +2,7 @@ ktorrent_add_plugin(ktorrent_bwscheduler)
set(ktbwschedulerplugin_dbus_SRC)
set(screensaver_xml ${KTORRENT_DBUS_XML_DIR}/org.freedesktop.ScreenSaver.xml)
qt5_add_dbus_interface(ktbwschedulerplugin_dbus_SRC ${screensaver_xml} screensaver_interface)
qt_add_dbus_interface(ktbwschedulerplugin_dbus_SRC ${screensaver_xml} screensaver_interface)
target_sources(ktorrent_bwscheduler PRIVATE
${ktbwschedulerplugin_dbus_SRC}
......
......@@ -7,10 +7,10 @@ ktorrent_add_plugin(ktorrent_mediaplayer)
set(ktmediaplayerplugin_dbus_SRC)
set(screensaver_xml ${KTORRENT_DBUS_XML_DIR}/org.freedesktop.ScreenSaver.xml)
qt5_add_dbus_interface(ktmediaplayerplugin_dbus_SRC ${screensaver_xml} screensaver_interface)
qt_add_dbus_interface(ktmediaplayerplugin_dbus_SRC ${screensaver_xml} screensaver_interface)
set(powermanagementinhibit_xml ${KTORRENT_DBUS_XML_DIR}/org.freedesktop.PowerManagement.Inhibit.xml)
qt5_add_dbus_interface(ktmediaplayerplugin_dbus_SRC ${powermanagementinhibit_xml} powermanagementinhibit_interface)
qt_add_dbus_interface(ktmediaplayerplugin_dbus_SRC ${powermanagementinhibit_xml} powermanagementinhibit_interface)
target_sources(ktorrent_mediaplayer PRIVATE
${ktmediaplayerplugin_dbus_SRC}
......@@ -35,7 +35,7 @@ target_link_libraries(
ktorrent_mediaplayer
ktcore
Taglib::Taglib
Phonon::phonon4qt5
Phonon::phonon4qt${QT_MAJOR_VERSION}
KF5::Torrent
KF5::I18n
KF5::KIOFileWidgets
......
......@@ -5,10 +5,10 @@ ktorrent_add_plugin(ktorrent_shutdown)
set(ktshutdownplugin_dbus_SRC)
set(screensaver_xml ${KTORRENT_DBUS_XML_DIR}/org.freedesktop.ScreenSaver.xml)
qt5_add_dbus_interface(ktshutdownplugin_dbus_SRC ${screensaver_xml} screensaver_interface)
qt_add_dbus_interface(ktshutdownplugin_dbus_SRC ${screensaver_xml} screensaver_interface)
set(powermanagement_xml ${KTORRENT_DBUS_XML_DIR}/org.freedesktop.PowerManagement.xml)
qt5_add_dbus_interface(ktshutdownplugin_dbus_SRC ${powermanagement_xml} powermanagement_interface)
qt_add_dbus_interface(ktshutdownplugin_dbus_SRC ${powermanagement_xml} powermanagement_interface)
target_sources(ktorrent_shutdown PRIVATE
${ktshutdownplugin_dbus_SRC}
......
file(GLOB icons "*.png")
ecm_install_icons(
ICONS ${icons}
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