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

Adapt build system for building against qt6

parent f149afff
Pipeline #121409 passed with stage
in 4 minutes and 21 seconds
......@@ -60,8 +60,8 @@ set(GRANTLEETHEME_LIB_VERSION "5.19.40")
set(AKONADI_SEARCH_VERSION "5.19.40")
set(QT_REQUIRED_VERSION "5.15.2")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Network PrintSupport Test Widgets Xml)
find_package(Qt5X11Extras NO_MODULE)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Network PrintSupport Test Widgets Xml)
find_package(Qt${QT_MAJOR_VERSION}X11Extras NO_MODULE)
find_package(Grantlee5 "5.2" CONFIG REQUIRED)
# Find KF5 package
find_package(KF5Completion ${KF5_MIN_VERSION} REQUIRED)
......
......@@ -3,9 +3,9 @@
add_executable(noteeditorutilstest noteeditorutilstest.cpp noteeditorutilstest.h)
add_test(NAME noteeditorutilstest COMMAND noteeditorutilstest)
ecm_mark_as_test(noteeditorutilstest)
target_link_libraries(noteeditorutilstest Qt::Test notesharedprivate)
target_link_libraries(noteeditorutilstest Qt${QT_MAJOR_VERSION}::Test notesharedprivate)
add_executable(noteutilstest noteutilstest.cpp noteutilstest.h)
add_test(NAME noteutilstest COMMAND noteutilstest)
ecm_mark_as_test(noteutilstest)
target_link_libraries(noteutilstest Qt::Test notesharedprivate)
target_link_libraries(noteutilstest Qt${QT_MAJOR_VERSION}::Test notesharedprivate)
......@@ -89,7 +89,7 @@ target_link_libraries(notesharedprivate
PUBLIC
KF5::AkonadiCore
PRIVATE
KF5::DNSSD KF5::PimCommon KF5::Mime KF5::AkonadiNotes KF5::PimTextEdit KF5::Completion Qt::DBus KF5::I18n KF5::AkonadiWidgets
KF5::DNSSD KF5::PimCommon KF5::Mime KF5::AkonadiNotes KF5::PimTextEdit KF5::Completion Qt${QT_MAJOR_VERSION}::DBus KF5::I18n KF5::AkonadiWidgets
)
......
......@@ -13,9 +13,9 @@ macro(add_noteshared_unittest _source)
ecm_mark_as_test(noteshared-${_name})
target_link_libraries(${_name}
notesharedprivate
Qt::Test
Qt::Core
Qt::Gui
Qt${QT_MAJOR_VERSION}::Test
Qt${QT_MAJOR_VERSION}::Core
Qt${QT_MAJOR_VERSION}::Gui
KF5::AkonadiCore
)
endmacro()
......
......@@ -73,7 +73,7 @@ target_link_libraries(knotesprivate
KF5::IconThemes
PRIVATE
KF5::PimCommon
KF5::KCMUtils Grantlee5::Templates KF5::NewStuff KF5::WindowSystem Qt::PrintSupport KF5::TextWidgets KF5::I18n notesharedprivate KF5::AkonadiSearchPIM KF5::AkonadiNotes KF5::PimTextEdit KF5::AkonadiWidgets KF5::GrantleeTheme
KF5::KCMUtils Grantlee5::Templates KF5::NewStuff KF5::WindowSystem Qt${QT_MAJOR_VERSION}::PrintSupport KF5::TextWidgets KF5::I18n notesharedprivate KF5::AkonadiSearchPIM KF5::AkonadiNotes KF5::PimTextEdit KF5::AkonadiWidgets KF5::GrantleeTheme
)
set_target_properties(knotesprivate
......@@ -138,7 +138,7 @@ target_link_libraries(knotes
KF5::AkonadiWidgets
)
if (Qt5X11Extras_FOUND)
target_link_libraries(knotes Qt::X11Extras ${X11_LIBRARIES})
target_link_libraries(knotes Qt${QT_MAJOR_VERSION}::X11Extras ${X11_LIBRARIES})
endif()
install(TARGETS knotes ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
......
......@@ -8,5 +8,5 @@ set( knotes_knotesgrantleeprint_source knotesgrantleeprinttest.cpp )
add_executable( knotesgrantleeprinttest ${knotes_knotesgrantleeprint_source})
add_test(NAME knotesgrantleeprinttest COMMAND knotesgrantleeprinttest)
ecm_mark_as_test(knotesgrantleeprinttest)
target_link_libraries( knotesgrantleeprinttest Qt::Test Qt::Gui KF5::AkonadiCore knotesprivate KF5::Mime KF5::AkonadiNotes Grantlee5::Templates KF5::GrantleeTheme)
target_link_libraries( knotesgrantleeprinttest Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Gui KF5::AkonadiCore knotesprivate KF5::Mime KF5::AkonadiNotes Grantlee5::Templates KF5::GrantleeTheme)
Markdown is supported
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