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.09 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 7
set(KDECONNECT_VERSION_MINOR 3)
set(KDECONNECT_VERSION_PATCH 0)
8 9
set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}")

10
set(QT_MIN_VERSION "5.7.0")
Nicolas Fella's avatar
Nicolas Fella committed
11
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 20 21
find_package(KF5 ${KF5_MIN_VERSION}
    REQUIRED COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils
    OPTIONAL_COMPONENTS DocTools
)
22
find_package(Qca-qt5 2.1.0 REQUIRED)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
23

Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
24 25
include_directories(${CMAKE_SOURCE_DIR})

26 27
configure_file(kdeconnect-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeconnect-version.h)

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

36 37
include(KDEConnectMacros.cmake)

38
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS)
39

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

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

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

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

Andreas Sturmlechner's avatar
Andreas Sturmlechner committed
74 75 76
if(BUILD_TESTING)
    add_subdirectory(tests)
endif()
77

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