diff options
author | Heiko Becker <heirecka@exherbo.org> | 2017-06-02 21:35:37 +0200 |
---|---|---|
committer | Heiko Becker <heirecka@exherbo.org> | 2017-07-29 11:01:28 +0200 |
commit | 51fbcca97ef9058cdb75c52ac77bdc728a296e4a (patch) | |
tree | 982206bd7c35353a10839802d237e53692fe7116 /tests | |
parent | ba32e5a606c77b968f53239caf276456c81b4db7 (diff) | |
download | kube-51fbcca97ef9058cdb75c52ac77bdc728a296e4a.tar.gz kube-51fbcca97ef9058cdb75c52ac77bdc728a296e4a.zip |
Use imported targets instead of qt5_use_modules
From Qt's documentation: "This macro is obsolete. Use
target_link_libraries with IMPORTED targets instead." It's only
recommended with cmake >=2.8.9 & < 2.8.12. Kube already requires
cmake 3.0.
One advantage of using the imported targets is, that
cmake complains if a target isn't found before it's used, like
Qt5Concurrent missing from the find_package_call here.
Reviewers: #kube, cmollekopf
Reviewed By: #kube, cmollekopf
Subscribers: #kube
Differential Revision: https://phabricator.kde.org/D6362
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e5ff1d72..f18ebc09 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -22,7 +22,13 @@ find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui Widgets WebEn | |||
22 | 22 | ||
23 | # build testrunner | 23 | # build testrunner |
24 | add_executable(kubetestrunner kubetestrunner.cpp) | 24 | add_executable(kubetestrunner kubetestrunner.cpp) |
25 | qt5_use_modules(kubetestrunner Gui Quick Widgets WebEngine QuickTest) | 25 | target_link_libraries(kubetestrunner |
26 | Qt5::Gui | ||
27 | Qt5::Quick | ||
28 | Qt5::Widgets | ||
29 | Qt5::WebEngine | ||
30 | Qt5::QuickTest | ||
31 | ) | ||
26 | 32 | ||
27 | # tests | 33 | # tests |
28 | add_test(NAME qmltests COMMAND kubetestrunner WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | 34 | add_test(NAME qmltests COMMAND kubetestrunner WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) |