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 --- accounts/kolabnow/CMakeLists.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'accounts/kolabnow') diff --git a/accounts/kolabnow/CMakeLists.txt b/accounts/kolabnow/CMakeLists.txt index 7b181522..8a178bf9 100644 --- a/accounts/kolabnow/CMakeLists.txt +++ b/accounts/kolabnow/CMakeLists.txt @@ -33,12 +33,22 @@ set(SRCS ) add_library(kolabnowaccountplugin SHARED ${SRCS}) -qt5_use_modules(kolabnowaccountplugin Core Quick Qml) -target_link_libraries(kolabnowaccountplugin sink frameworkplugin) +target_link_libraries(kolabnowaccountplugin + sink + frameworkplugin + Qt5::Core + Qt5::Quick + Qt5::Qml +) add_library(kolabnowaccount_static STATIC ${SRCS}) -qt5_use_modules(kolabnowaccount_static Core Quick Qml) -target_link_libraries(kolabnowaccount_static sink frameworkplugin) +target_link_libraries(kolabnowaccount_static + sink + frameworkplugin + Qt5::Core + Qt5::Quick + Qt5::Qml +) # add_subdirectory(tests) kpackage_install_package(package org.kube.accounts.kolabnow "genericqml") -- cgit v1.2.3