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 /applications | |
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 'applications')
-rw-r--r-- | applications/kube/CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/applications/kube/CMakeLists.txt b/applications/kube/CMakeLists.txt index 498e4895..ed9942c5 100644 --- a/applications/kube/CMakeLists.txt +++ b/applications/kube/CMakeLists.txt | |||
@@ -40,8 +40,13 @@ if(APPLE OR WIN32) | |||
40 | endif() | 40 | endif() |
41 | 41 | ||
42 | add_executable(${PROJECT_NAME} ${SRCS}) | 42 | add_executable(${PROJECT_NAME} ${SRCS}) |
43 | qt5_use_modules(${PROJECT_NAME} Gui Quick Widgets WebEngine) | 43 | target_link_libraries(${PROJECT_NAME} |
44 | target_link_libraries(${PROJECT_NAME} KF5::Package) | 44 | Qt5::Gui |
45 | Qt5::Quick | ||
46 | Qt5::Widgets | ||
47 | Qt5::WebEngine | ||
48 | KF5::Package | ||
49 | ) | ||
45 | 50 | ||
46 | install(TARGETS ${PROJECT_NAME} DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | 51 | install(TARGETS ${PROJECT_NAME} DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) |
47 | 52 | ||