Changeset View
Changeset View
Standalone View
Standalone View
autotests/CMakeLists.txt
1 | 1 | | |||
---|---|---|---|---|---|
2 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test) | 2 | find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test) | ||
3 | 3 | | |||
4 | include(ECMAddTests) | 4 | include(ECMAddTests) | ||
5 | 5 | | |||
6 | ecm_add_test(kstandardactiontest.cpp LINK_LIBRARIES Qt5::Test KF5::ConfigWidgets) | 6 | ecm_add_test(kstandardactiontest.cpp LINK_LIBRARIES Qt5::Test KF5::ConfigWidgets) | ||
7 | 7 | | |||
8 | set(kconfigdialog_unittest_SRCS kconfigdialog_unittest.cpp) | 8 | set(kconfigdialog_unittest_SRCS kconfigdialog_unittest.cpp) | ||
9 | kconfig_add_kcfg_files(kconfigdialog_unittest_SRCS GENERATE_MOC signaltest.kcfgc) | 9 | kconfig_add_kcfg_files(kconfigdialog_unittest_SRCS GENERATE_MOC signaltest.kcfgc) | ||
10 | ecm_add_test(${kconfigdialog_unittest_SRCS} TEST_NAME "kconfigdialog_unittest" LINK_LIBRARIES Qt5::Test KF5::ConfigWidgets) | 10 | ecm_add_test(${kconfigdialog_unittest_SRCS} TEST_NAME "kconfigdialog_unittest" LINK_LIBRARIES Qt5::Test KF5::ConfigWidgets) | ||
11 | 11 | | |||
12 | set(lang_entries | ||||
13 | ca | ||||
14 | de | ||||
15 | en_US | ||||
16 | es # must not have file! | ||||
17 | fr | ||||
18 | pt | ||||
19 | ) | ||||
20 | | ||||
21 | # scripty would mangle all *.desktop files, since that'd have potential of | ||||
22 | # breaking the test we'll need to bypass scripty by not having our files called | ||||
23 | # .desktop! | ||||
24 | # Do note that we pop these into CMAKE_LIBRARY_OUTPUT_DIRECTORY so QFINDTESTDATA | ||||
25 | # is able to find the fixtures in the bin dir as KDECMakeSettings sets a special | ||||
26 | # output dir. | ||||
27 | foreach(lang ${lang_entries}) | ||||
28 | set(src_dir "${CMAKE_CURRENT_SOURCE_DIR}/kf5_entry_data.cmake/locale/${lang}") | ||||
29 | set(src_file "${src_dir}/kf5_entry.cmake") | ||||
30 | set(bin_dir "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/kf5_entry_data/locale/${lang}") | ||||
31 | set(bin_file "${bin_dir}/kf5_entry.desktop") | ||||
32 | file(MAKE_DIRECTORY ${bin_dir}) | ||||
33 | if(EXISTS ${src_file}) # not all languages have entries | ||||
34 | configure_file(${src_file} ${bin_file} COPYONLY) | ||||
35 | endif() | ||||
36 | endforeach() | ||||
37 | | ||||
38 | ecm_add_test(klanguagenametest.cpp LINK_LIBRARIES Qt5::Test KF5::ConfigWidgets) | ||||
12 | 39 | | |||
13 | ecm_add_test(krecentfilesactiontest.cpp TEST_NAME "krecentfilesaction_test" LINK_LIBRARIES Qt5::Test KF5::ConfigWidgets) | 40 | ecm_add_test(krecentfilesactiontest.cpp TEST_NAME "krecentfilesaction_test" LINK_LIBRARIES Qt5::Test KF5::ConfigWidgets) |