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 /examples/imapresource | |
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 'examples/imapresource')
-rw-r--r-- | examples/imapresource/CMakeLists.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/imapresource/CMakeLists.txt b/examples/imapresource/CMakeLists.txt index 5d2d38b..f5f51f8 100644 --- a/examples/imapresource/CMakeLists.txt +++ b/examples/imapresource/CMakeLists.txt | |||
@@ -9,8 +9,7 @@ find_package(KIMAP2 0.2 REQUIRED) | |||
9 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | 9 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) |
10 | 10 | ||
11 | add_library(${PROJECT_NAME} SHARED imapresource.cpp imapserverproxy.cpp) | 11 | add_library(${PROJECT_NAME} SHARED imapresource.cpp imapserverproxy.cpp) |
12 | qt5_use_modules(${PROJECT_NAME} Core Network) | 12 | target_link_libraries(${PROJECT_NAME} sink Qt5::Core Qt5::Network KF5::Mime KIMAP2) |
13 | target_link_libraries(${PROJECT_NAME} sink KF5::Mime KIMAP2) | ||
14 | 13 | ||
15 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SINK_RESOURCE_PLUGINS_PATH}) | 14 | install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${SINK_RESOURCE_PLUGINS_PATH}) |
16 | 15 | ||