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 /accounts | |
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 'accounts')
-rw-r--r-- | accounts/gmail/CMakeLists.txt | 9 | ||||
-rw-r--r-- | accounts/imap/CMakeLists.txt | 20 | ||||
-rw-r--r-- | accounts/imap/tests/CMakeLists.txt | 9 | ||||
-rw-r--r-- | accounts/kolabnow/CMakeLists.txt | 18 | ||||
-rw-r--r-- | accounts/maildir/CMakeLists.txt | 20 | ||||
-rw-r--r-- | accounts/maildir/tests/CMakeLists.txt | 9 |
6 files changed, 65 insertions, 20 deletions
diff --git a/accounts/gmail/CMakeLists.txt b/accounts/gmail/CMakeLists.txt index 78d65572..ae98a20a 100644 --- a/accounts/gmail/CMakeLists.txt +++ b/accounts/gmail/CMakeLists.txt | |||
@@ -33,8 +33,13 @@ set(SRCS | |||
33 | ) | 33 | ) |
34 | 34 | ||
35 | add_library(gmailaccountplugin SHARED ${SRCS}) | 35 | add_library(gmailaccountplugin SHARED ${SRCS}) |
36 | qt5_use_modules(gmailaccountplugin Core Quick Qml) | 36 | target_link_libraries(gmailaccountplugin |
37 | target_link_libraries(gmailaccountplugin sink frameworkplugin) | 37 | sink |
38 | frameworkplugin | ||
39 | Qt5::Core | ||
40 | Qt5::Quick | ||
41 | Qt5::Qml | ||
42 | ) | ||
38 | 43 | ||
39 | kpackage_install_package(package org.kube.accounts.gmail "genericqml") | 44 | kpackage_install_package(package org.kube.accounts.gmail "genericqml") |
40 | 45 | ||
diff --git a/accounts/imap/CMakeLists.txt b/accounts/imap/CMakeLists.txt index 13e6e2ec..259c8e69 100644 --- a/accounts/imap/CMakeLists.txt +++ b/accounts/imap/CMakeLists.txt | |||
@@ -19,7 +19,7 @@ include(KDEInstallDirs) | |||
19 | include(KDECMakeSettings) | 19 | include(KDECMakeSettings) |
20 | include(KDECompilerSettings) | 20 | include(KDECompilerSettings) |
21 | 21 | ||
22 | find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui) | 22 | find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Concurrent Quick Test Gui) |
23 | 23 | ||
24 | find_package(Sink CONFIG REQUIRED) | 24 | find_package(Sink CONFIG REQUIRED) |
25 | find_package(KAsync CONFIG REQUIRED) | 25 | find_package(KAsync CONFIG REQUIRED) |
@@ -33,12 +33,22 @@ set(SRCS | |||
33 | ) | 33 | ) |
34 | 34 | ||
35 | add_library(imapaccountplugin SHARED ${SRCS}) | 35 | add_library(imapaccountplugin SHARED ${SRCS}) |
36 | qt5_use_modules(imapaccountplugin Core Quick Qml) | 36 | target_link_libraries(imapaccountplugin |
37 | target_link_libraries(imapaccountplugin sink frameworkplugin) | 37 | sink |
38 | frameworkplugin | ||
39 | Qt5::Core | ||
40 | Qt5::Quick | ||
41 | Qt5::Qml | ||
42 | ) | ||
38 | 43 | ||
39 | add_library(imapaccount_static STATIC ${SRCS}) | 44 | add_library(imapaccount_static STATIC ${SRCS}) |
40 | qt5_use_modules(imapaccount_static Core Quick Qml) | 45 | target_link_libraries(imapaccount_static |
41 | target_link_libraries(imapaccount_static sink frameworkplugin) | 46 | sink |
47 | frameworkplugin | ||
48 | Qt5::Core | ||
49 | Qt5::Quick | ||
50 | Qt5::Qml | ||
51 | ) | ||
42 | add_subdirectory(tests) | 52 | add_subdirectory(tests) |
43 | 53 | ||
44 | kpackage_install_package(package org.kube.accounts.imap "genericqml") | 54 | kpackage_install_package(package org.kube.accounts.imap "genericqml") |
diff --git a/accounts/imap/tests/CMakeLists.txt b/accounts/imap/tests/CMakeLists.txt index 9c914370..82d6059c 100644 --- a/accounts/imap/tests/CMakeLists.txt +++ b/accounts/imap/tests/CMakeLists.txt | |||
@@ -2,5 +2,10 @@ include_directories(../) | |||
2 | cmake_policy(SET CMP0063 NEW) | 2 | cmake_policy(SET CMP0063 NEW) |
3 | add_executable(imapsettingstest settingstest.cpp) | 3 | add_executable(imapsettingstest settingstest.cpp) |
4 | add_test(imapsettingstest settingstest) | 4 | add_test(imapsettingstest settingstest) |
5 | qt5_use_modules(imapsettingstest Core Test Concurrent) | 5 | target_link_libraries(imapsettingstest |
6 | target_link_libraries(imapsettingstest sink imapaccount_static) | 6 | sink |
7 | imapaccount_static | ||
8 | Qt5::Core | ||
9 | Qt5::Concurrent | ||
10 | Qt5::Test | ||
11 | ) | ||
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 | |||
33 | ) | 33 | ) |
34 | 34 | ||
35 | add_library(kolabnowaccountplugin SHARED ${SRCS}) | 35 | add_library(kolabnowaccountplugin SHARED ${SRCS}) |
36 | qt5_use_modules(kolabnowaccountplugin Core Quick Qml) | 36 | target_link_libraries(kolabnowaccountplugin |
37 | target_link_libraries(kolabnowaccountplugin sink frameworkplugin) | 37 | sink |
38 | frameworkplugin | ||
39 | Qt5::Core | ||
40 | Qt5::Quick | ||
41 | Qt5::Qml | ||
42 | ) | ||
38 | 43 | ||
39 | add_library(kolabnowaccount_static STATIC ${SRCS}) | 44 | add_library(kolabnowaccount_static STATIC ${SRCS}) |
40 | qt5_use_modules(kolabnowaccount_static Core Quick Qml) | 45 | target_link_libraries(kolabnowaccount_static |
41 | target_link_libraries(kolabnowaccount_static sink frameworkplugin) | 46 | sink |
47 | frameworkplugin | ||
48 | Qt5::Core | ||
49 | Qt5::Quick | ||
50 | Qt5::Qml | ||
51 | ) | ||
42 | # add_subdirectory(tests) | 52 | # add_subdirectory(tests) |
43 | 53 | ||
44 | kpackage_install_package(package org.kube.accounts.kolabnow "genericqml") | 54 | kpackage_install_package(package org.kube.accounts.kolabnow "genericqml") |
diff --git a/accounts/maildir/CMakeLists.txt b/accounts/maildir/CMakeLists.txt index efd0ec6a..b321f0ad 100644 --- a/accounts/maildir/CMakeLists.txt +++ b/accounts/maildir/CMakeLists.txt | |||
@@ -19,7 +19,7 @@ include(KDEInstallDirs) | |||
19 | include(KDECMakeSettings) | 19 | include(KDECMakeSettings) |
20 | include(KDECompilerSettings) | 20 | include(KDECompilerSettings) |
21 | 21 | ||
22 | find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui) | 22 | find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Core Concurrent Quick Test Gui) |
23 | 23 | ||
24 | find_package(Sink CONFIG REQUIRED) | 24 | find_package(Sink CONFIG REQUIRED) |
25 | find_package(KAsync CONFIG REQUIRED) | 25 | find_package(KAsync CONFIG REQUIRED) |
@@ -33,12 +33,22 @@ set(SRCS | |||
33 | ) | 33 | ) |
34 | 34 | ||
35 | add_library(maildiraccountplugin SHARED ${SRCS}) | 35 | add_library(maildiraccountplugin SHARED ${SRCS}) |
36 | qt5_use_modules(maildiraccountplugin Core Quick Qml) | 36 | target_link_libraries(maildiraccountplugin |
37 | target_link_libraries(maildiraccountplugin sink frameworkplugin) | 37 | sink |
38 | frameworkplugin | ||
39 | Qt5::Core | ||
40 | Qt5::Quick | ||
41 | Qt5::Qml | ||
42 | ) | ||
38 | 43 | ||
39 | add_library(maildiraccount_static STATIC ${SRCS}) | 44 | add_library(maildiraccount_static STATIC ${SRCS}) |
40 | qt5_use_modules(maildiraccount_static Core Quick Qml) | 45 | target_link_libraries(maildiraccount_static |
41 | target_link_libraries(maildiraccount_static sink frameworkplugin) | 46 | sink |
47 | frameworkplugin | ||
48 | Qt5::Core | ||
49 | Qt5::Quick | ||
50 | Qt5::Qml | ||
51 | ) | ||
42 | add_subdirectory(tests) | 52 | add_subdirectory(tests) |
43 | 53 | ||
44 | kpackage_install_package(package org.kube.accounts.maildir "genericqml") | 54 | kpackage_install_package(package org.kube.accounts.maildir "genericqml") |
diff --git a/accounts/maildir/tests/CMakeLists.txt b/accounts/maildir/tests/CMakeLists.txt index cc7651b3..2452e526 100644 --- a/accounts/maildir/tests/CMakeLists.txt +++ b/accounts/maildir/tests/CMakeLists.txt | |||
@@ -2,5 +2,10 @@ include_directories(../) | |||
2 | cmake_policy(SET CMP0063 NEW) | 2 | cmake_policy(SET CMP0063 NEW) |
3 | add_executable(settingstest settingstest.cpp) | 3 | add_executable(settingstest settingstest.cpp) |
4 | add_test(settingstest settingstest) | 4 | add_test(settingstest settingstest) |
5 | qt5_use_modules(settingstest Core Test Concurrent) | 5 | target_link_libraries(settingstest |
6 | target_link_libraries(settingstest sink maildiraccount_static) | 6 | sink |
7 | maildiraccount_static | ||
8 | Qt5::Core | ||
9 | Qt5::Test | ||
10 | Qt5::Concurrent | ||
11 | ) | ||