From 10c4a4b4bdfdd468e52ae0fbbf84c77b64df2f8f Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Fri, 3 Dec 2021 22:33:28 +0200 Subject: WIP: Change the build system to enable building with Qt 6 This was built with: -DQT_MAJOR_VERSION=6 \ -DEXCLUDE_DEPRECATED_BEFORE_AND_AT=5.90.0 \ -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055a00 Move the include(KDEInstallDirs) call before the first find_package(Qt*, the former is what auto-detects the Qt version, and defaults to 5. This is needed to be able to build against Qt5 by default. All unit tests still pass. --- autotests/kconfig_compiler/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'autotests/kconfig_compiler') diff --git a/autotests/kconfig_compiler/CMakeLists.txt b/autotests/kconfig_compiler/CMakeLists.txt index 4caa17af..5cbf2e44 100644 --- a/autotests/kconfig_compiler/CMakeLists.txt +++ b/autotests/kconfig_compiler/CMakeLists.txt @@ -177,7 +177,7 @@ set(test_state_config_SRCS test_state_config_main.cpp) gen_kcfg_test_source(test_state_config test_state_config_SRCS GENERATE_MOC) ecm_add_test(TEST_NAME test_state_config ${test_state_config_SRCS}) -target_link_libraries(test_state_config KF5::ConfigGui Qt5::Test) +target_link_libraries(test_state_config KF5::ConfigGui Qt${QT_MAJOR_VERSION}::Test) ########### next target ############### @@ -234,7 +234,7 @@ gen_kcfg_test_source(signals_test_no_singleton_dpointer kconfigcompiler_test_sig ecm_add_test(${kconfigcompiler_test_signals_SRCS} TEST_NAME kconfigcompiler-signals-test - LINK_LIBRARIES Qt5::Test KF5::ConfigGui + LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5::ConfigGui ) ########### next target ############### @@ -261,7 +261,7 @@ ecm_add_test(${test_param_minmax_SRCS} ecm_add_test(kconfigcompiler_test.cpp TEST_NAME kconfigcompiler-basic-test - LINK_LIBRARIES Qt5::Test + LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test ) -- cgit v1.2.1