CMakeLists.txt 1.75 KB
Newer Older
Dan Vrátil's avatar
Dan Vrátil committed
1
2
project(KTPContactRunner)

3
4
cmake_minimum_required(VERSION 2.8.12)

Nicolas Lécureuil's avatar
Nicolas Lécureuil committed
5
6
include(FeatureSummary)

7
# KDE Application Version, managed by release script
8
set(RELEASE_SERVICE_VERSION_MAJOR "20")
9
set(RELEASE_SERVICE_VERSION_MINOR "11")
10
11
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(KTP_CONTACT_RUNNER_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
Dan Vrátil's avatar
Dan Vrátil committed
12
13
set(IS_KTP_INTERNAL_MODULE TRUE)

Hrvoje Senjan's avatar
Hrvoje Senjan committed
14
find_package(ECM 1.0.0 REQUIRED NO_MODULE)
Vishesh Handa's avatar
Vishesh Handa committed
15
set (CMAKE_MODULE_PATH
Hrvoje Senjan's avatar
Hrvoje Senjan committed
16
     ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_MODULE_PATH}
Vishesh Handa's avatar
Vishesh Handa committed
17
)
David Edmundson's avatar
David Edmundson committed
18
cmake_policy(SET CMP0002 OLD)
19
20

# Find the required Libaries
Martin Klapetek's avatar
Martin Klapetek committed
21
find_package (Qt5 REQUIRED CONFIG COMPONENTS Widgets Core DBus Network)
22
find_package (KF5 REQUIRED COMPONENTS I18n Service Runner)
Vishesh Handa's avatar
Vishesh Handa committed
23
find_package (KTp REQUIRED)
24

Vishesh Handa's avatar
Vishesh Handa committed
25
26
27
28
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
include(FeatureSummary)
Dan Vrátil's avatar
Dan Vrátil committed
29

30
31
32
33
34
35
include_directories(
   ${CMAKE_SOURCE_DIR}
   ${CMAKE_BINARY_DIR}
   )

# We add our source code here
Dan Vrátil's avatar
Dan Vrátil committed
36
set(runner_SRCS src/contactrunner.cpp)
37

Vishesh Handa's avatar
Vishesh Handa committed
38
add_library(krunner_ktp_contacts MODULE ${runner_SRCS})
39
40
41
42
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plasma-runner-ktp-contact.desktop.cmake
               ${CMAKE_CURRENT_BINARY_DIR}/plasma-runner-ktp-contact.desktop
               @ONLY)
kcoreaddons_desktop_to_json(krunner_ktp_contacts ${CMAKE_CURRENT_BINARY_DIR}/plasma-runner-ktp-contact.desktop)
Dan Vrátil's avatar
Dan Vrátil committed
43
target_link_libraries(krunner_ktp_contacts
Martin Klapetek's avatar
Martin Klapetek committed
44
                      Qt5::Widgets
Hrvoje Senjan's avatar
Hrvoje Senjan committed
45
46
                      KF5::I18n
                      KF5::Service
Vishesh Handa's avatar
Vishesh Handa committed
47
                      KF5::Runner
Hrvoje Senjan's avatar
Hrvoje Senjan committed
48
49
                      KTp::Models
                      KTp::CommonInternals)
50

51
install(TARGETS krunner_ktp_contacts DESTINATION "${KDE_INSTALL_PLUGINDIR}/kf5/krunner")
52

Nicolas Lécureuil's avatar
Nicolas Lécureuil committed
53
54
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)