Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

CMakeLists.txt 2.11 KB
Newer Older
1 2
cmake_minimum_required(VERSION 3.0)

3
project(kdeconnect)
4

5
set(KDECONNECT_VERSION_MAJOR 1)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
6
set(KDECONNECT_VERSION_MINOR 2)
7
set(KDECONNECT_VERSION_PATCH 1)
8 9
set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}")

10 11
set(QT_MIN_VERSION "5.7.0")
set(KF5_MIN_VERSION "5.42.0")
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
12

13
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
14
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake)
15

16
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Quick)
17

18 19
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils)
find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS DocTools)
20
find_package(Qca-qt5 2.1.0 REQUIRED)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
21

Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
22 23
include_directories(${CMAKE_SOURCE_DIR})

24 25
configure_file(kdeconnect-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeconnect-version.h)

26
include(KDEInstallDirs)
27
include(KDECompilerSettings NO_POLICY_SCOPE)
28 29 30 31 32
include(KDECMakeSettings)
include(ECMAddTests)
include(ECMSetupVersion)
include(ECMInstallIcons)
include(FeatureSummary)
33

34 35
include(KDEConnectMacros.cmake)

36
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS)
37

38
include(GenerateExportHeader)
39
include_directories(${CMAKE_CURRENT_BINARY_DIR})
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
40

Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
41
add_subdirectory(core)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
42
add_subdirectory(kcm)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
43
add_subdirectory(kcmplugin)
44 45
if(NOT WIN32)
	add_subdirectory(kio)
46
	add_subdirectory(plasmoid)
47
endif()
48
add_subdirectory(icon)
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
49 50
add_subdirectory(interfaces)

Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
51 52 53 54
option(EXPERIMENTALAPP_ENABLED OFF)
if(EXPERIMENTALAPP_ENABLED)
    add_subdirectory(app)
endif()
55
add_subdirectory(daemon)
56
add_subdirectory(plugins)
57
add_subdirectory(cli)
58
add_subdirectory(indicator)
59
add_subdirectory(fileitemactionplugin)
60
add_subdirectory(urlhandler)
61
add_subdirectory(nautilus-extension)
62 63 64 65 66 67

option(SMSAPP_ENABLED OFF)
if(SMSAPP_ENABLED)
    find_package(KF5People REQUIRED)
    add_subdirectory(smsapp)
endif()
68 69 70
if(KF5DocTools_FOUND)
    add_subdirectory(doc)
endif()
David Edmundson's avatar
David Edmundson committed
71

Andreas Sturmlechner's avatar
Andreas Sturmlechner committed
72 73 74
if(BUILD_TESTING)
    add_subdirectory(tests)
endif()
75

76
install(FILES org.kde.kdeconnect.kcm.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
77
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)