From 3caf5e790850a655b1fb7dc7d2c374ec84e9e8cf Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 10 Apr 2015 17:48:48 +0200 Subject: [PATCH] Move some find_package dependencies to the children directories as agreed --- core/CMakeLists.txt | 2 +- fileitemactionplugin/CMakeLists.txt | 2 ++ kcmplugin/CMakeLists.txt | 6 ++---- kio/CMakeLists.txt | 1 + plugins/pausemusic/CMakeLists.txt | 6 ++---- plugins/sftp/CMakeLists.txt | 2 +- plugins/share/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 2 ++ 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index cecb8fec4..f4659592e 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -29,7 +29,7 @@ set(kdeconnectcore_SRCS device.cpp ) -add_library(kdeconnectcore SHARED ${kdeconnectcore_SRCS}) +add_library(kdeconnectcore ${kdeconnectcore_SRCS}) target_link_libraries(kdeconnectcore PUBLIC Qt5::Network diff --git a/fileitemactionplugin/CMakeLists.txt b/fileitemactionplugin/CMakeLists.txt index fddb897b9..08e72dcdc 100644 --- a/fileitemactionplugin/CMakeLists.txt +++ b/fileitemactionplugin/CMakeLists.txt @@ -1,3 +1,5 @@ +find_package(KF5 REQUIRED COMPONENTS KIO) + add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-fileitemaction") include_directories(${CMAKE_SOURCE_DIR}) diff --git a/kcmplugin/CMakeLists.txt b/kcmplugin/CMakeLists.txt index 06f3d6c1d..18b7c09be 100644 --- a/kcmplugin/CMakeLists.txt +++ b/kcmplugin/CMakeLists.txt @@ -2,11 +2,9 @@ project(kdeconnectpluginkcm) add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-core\") -set(kdeconnectpluginkcm_SRCS - kdeconnectpluginkcm.cpp -) +find_package(KF5 REQUIRED COMPONENTS KCMUtils) -add_library(kdeconnectpluginkcm SHARED ${kdeconnectpluginkcm_SRCS}) +add_library(kdeconnectpluginkcm kdeconnectpluginkcm.cpp) target_link_libraries(kdeconnectpluginkcm PUBLIC kdeconnectcore diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt index fc81f4a20..d3eaf68c5 100644 --- a/kio/CMakeLists.txt +++ b/kio/CMakeLists.txt @@ -1,5 +1,6 @@ include_directories(${CMAKE_SOURCE_DIR}) add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kio") +find_package(KF5 REQUIRED COMPONENTS KIO) set(kio_kdeconnect_PART_SRCS kiokdeconnect.cpp diff --git a/plugins/pausemusic/CMakeLists.txt b/plugins/pausemusic/CMakeLists.txt index c30af3447..0f472cbee 100644 --- a/plugins/pausemusic/CMakeLists.txt +++ b/plugins/pausemusic/CMakeLists.txt @@ -1,8 +1,6 @@ -set(kdeconnect_pausemusic_SRCS - pausemusicplugin.cpp -) +find_package(KF5 REQUIRED COMPONENTS KCMUtils) -kdeconnect_add_plugin(kdeconnect_pausemusic JSON kdeconnect_pausemusic.json SOURCES ${kdeconnect_pausemusic_SRCS}) +kdeconnect_add_plugin(kdeconnect_pausemusic JSON kdeconnect_pausemusic.json SOURCES pausemusicplugin.cpp) target_link_libraries(kdeconnect_pausemusic kdeconnectcore diff --git a/plugins/sftp/CMakeLists.txt b/plugins/sftp/CMakeLists.txt index 34070315c..8c9d65dff 100644 --- a/plugins/sftp/CMakeLists.txt +++ b/plugins/sftp/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(KF5 REQUIRED COMPONENTS Notifications) +find_package(KF5 REQUIRED COMPONENTS Notifications KIO) set(kdeconnect_sftp_SRCS mounter.cpp diff --git a/plugins/share/CMakeLists.txt b/plugins/share/CMakeLists.txt index fa7080060..4debe884a 100644 --- a/plugins/share/CMakeLists.txt +++ b/plugins/share/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(KF5 REQUIRED COMPONENTS Notifications) +find_package(KF5 REQUIRED COMPONENTS Notifications KIO) set(kdeconnect_share_SRCS shareplugin.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b21a04fe6..b00a574dc 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,5 @@ +find_package(KF5 REQUIRED COMPONENTS KIO) + include_directories( ${KDEConnectCore_BINARY_DIR} ${CMAKE_SOURCE_DIR}