From 51fbcca97ef9058cdb75c52ac77bdc728a296e4a Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Fri, 2 Jun 2017 21:35:37 +0200 Subject: 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 --- tests/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/CMakeLists.txt') 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 # build testrunner add_executable(kubetestrunner kubetestrunner.cpp) -qt5_use_modules(kubetestrunner Gui Quick Widgets WebEngine QuickTest) +target_link_libraries(kubetestrunner + Qt5::Gui + Qt5::Quick + Qt5::Widgets + Qt5::WebEngine + Qt5::QuickTest +) # tests add_test(NAME qmltests COMMAND kubetestrunner WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -- cgit v1.2.3