diff options
author | Heiko Becker <heirecka@exherbo.org> | 2017-05-13 00:11:45 +0200 |
---|---|---|
committer | Heiko Becker <heirecka@exherbo.org> | 2017-07-29 11:00:15 +0200 |
commit | 9e6952baf64b51fa7ddb6ac91d4ce79ebfd2b2df (patch) | |
tree | 3a38a173968d2902cbc2459a17126ccb4e4c8cfb /common/CMakeLists.txt | |
parent | 5275b0f173579162176e2340cbb9eaedafe8334a (diff) | |
download | sink-9e6952baf64b51fa7ddb6ac91d4ce79ebfd2b2df.tar.gz sink-9e6952baf64b51fa7ddb6ac91d4ce79ebfd2b2df.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. Sink 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: #sink, cmollekopf
Reviewed By: #sink, cmollekopf
Subscribers: #sink
Tags: #sink
Differential Revision: https://phabricator.kde.org/D6361
Diffstat (limited to 'common/CMakeLists.txt')
-rw-r--r-- | common/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 001a412..8421fc2 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt | |||
@@ -116,13 +116,13 @@ SET_TARGET_PROPERTIES(${PROJECT_NAME} | |||
116 | EXPORT_NAME ${PROJECT_NAME} | 116 | EXPORT_NAME ${PROJECT_NAME} |
117 | ) | 117 | ) |
118 | 118 | ||
119 | qt5_use_modules(${PROJECT_NAME} LINK_PUBLIC Network) | ||
120 | qt5_use_modules(${PROJECT_NAME} LINK_PRIVATE Gui) | ||
121 | target_link_libraries(${PROJECT_NAME} | 119 | target_link_libraries(${PROJECT_NAME} |
122 | PUBLIC | 120 | PUBLIC |
123 | KAsync | 121 | KAsync |
122 | Qt5::Network | ||
124 | PRIVATE | 123 | PRIVATE |
125 | ${storage_LIBS} | 124 | ${storage_LIBS} |
125 | Qt5::Gui | ||
126 | KF5::Mime | 126 | KF5::Mime |
127 | KF5::Contacts | 127 | KF5::Contacts |
128 | ) | 128 | ) |