Commit 04520799 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent c516c8b5
......@@ -9,12 +9,29 @@ set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_
project(ksirk VERSION ${RELEASE_SERVICE_VERSION})
set (QT_MIN_VERSION "5.15.0")
set (KF5_MIN_VERSION "5.83.0")
set (KF5_MIN_VERSION "5.90.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg Test)
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMQtDeclareLoggingCategory)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg Test)
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS SvgWidgets)
endif()
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Completion
Config
......@@ -31,22 +48,11 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
)
find_package(KF5KDEGames 4.9.0 REQUIRED)
find_package(Phonon4Qt5 REQUIRED)
find_package(Phonon4Qt${QT_MAJOR_VERSION} REQUIRED)
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMQtDeclareLoggingCategory)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
find_package(Phonon4Qt5 CONFIG REQUIRED)
find_package(Qca-qt5 2.1.0)
find_package(Phonon4Qt${QT_MAJOR_VERSION} CONFIG REQUIRED)
find_package(Qca-qt${QT_MAJOR_VERSION} 2.1.0)
set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Support for encryption"
URL "https://download.kde.org/stable/qca-qt5"
TYPE REQUIRED)
......
......@@ -129,15 +129,15 @@ ecm_add_app_icon(ksirk_SRCS ICONS ${ICONS_SRCS})
add_executable(ksirk ${ksirk_SRCS})
target_link_libraries(ksirk
Qt5::Xml
Qt5::Svg
qca-qt5
Qt::Xml
Qt::Svg
qca-qt${QT_MAJOR_VERSION}
iris_ksirk
KF5::Crash
KF5::KIOCore
KF5::NewStuff
KF5::Wallet
Phonon::phonon4qt5
Phonon::phonon4qt${QT_MAJOR_VERSION}
KF5KDEGames
KF5KDEGamesPrivate
)
......
......@@ -94,7 +94,7 @@ include_directories(
xmpp/xmpp-im
${QCA2_INCLUDE_DIR}
)
qt5_wrap_cpp(libiris_SRCS
qt_wrap_cpp(libiris_SRCS
xmpp/xmpp-im/xmpp_client.h
xmpp/xmpp-core/xmpp_clientstream.h
xmpp/xmpp-core/xmpp_stream.h
......@@ -134,7 +134,7 @@ endif()
add_library(iris_ksirk SHARED ${libiris_SRCS})
set(iris_ksirk_libs Qt5::Core Qt5::Gui Qt5::Network Qt5::Xml ${IDN_LIBRARY} qca-qt5 ${ZLIB_LIBRARIES} Qt5::Widgets)
set(iris_ksirk_libs Qt::Core Qt::Gui Qt::Network Qt::Xml ${IDN_LIBRARY} qca-qt${QT_MAJOR_VERSION} ${ZLIB_LIBRARIES} Qt::Widgets)
if(WIN32)
set(iris_ksirk_libs ${iris_ksirk_libs} ws2_32)
endif(WIN32)
......
......@@ -51,15 +51,20 @@ kconfig_add_kcfg_files( ksirkskineditor_SRCS ksirkskineditorsettings.kcfgc )
add_executable(ksirkskineditor ${ksirkskineditor_SRCS})
target_link_libraries(ksirkskineditor
Qt5::Xml
Qt5::Svg
Qt::Xml
Qt::Svg
KF5::KIOCore
Phonon::phonon4qt5
Phonon::phonon4qt${QT_MAJOR_VERSION}
KF5::XmlGui
KF5KDEGames
KF5KDEGamesPrivate
${CRYPT_LIBS}
)
if (QT_MAJOR_VERSION STREQUAL "6")
target_link_libraries(ksirkskineditor
Qt6::SvgWidgets)
endif()
install( TARGETS ksirkskineditor ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
......
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