CMakeLists.txt 2.28 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)
23 24 25 26 27 28
find_package(Phonon4Qt5 4.9.0 NO_MODULE)
set_package_properties(Phonon4Qt5 PROPERTIES
   DESCRIPTION "Qt-based audio library"
   TYPE OPTIONAL
   PURPOSE "Required for Find My Device plugin"
)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
29

Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
30 31
include_directories(${CMAKE_SOURCE_DIR})

32 33
configure_file(kdeconnect-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeconnect-version.h)

34
include(KDEInstallDirs)
35
include(KDECompilerSettings NO_POLICY_SCOPE)
36 37 38 39 40
include(KDECMakeSettings)
include(ECMAddTests)
include(ECMSetupVersion)
include(ECMInstallIcons)
include(FeatureSummary)
41

42 43
include(KDEConnectMacros.cmake)

44
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS)
45

46
include(GenerateExportHeader)
47
include_directories(${CMAKE_CURRENT_BINARY_DIR})
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
48

Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
49
add_subdirectory(core)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
50
add_subdirectory(kcm)
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
51
add_subdirectory(kcmplugin)
52 53
if(NOT WIN32)
	add_subdirectory(kio)
54
	add_subdirectory(plasmoid)
55
endif()
56
add_subdirectory(icon)
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
57 58
add_subdirectory(interfaces)

Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
59 60 61 62
option(EXPERIMENTALAPP_ENABLED OFF)
if(EXPERIMENTALAPP_ENABLED)
    add_subdirectory(app)
endif()
63
add_subdirectory(daemon)
64
add_subdirectory(plugins)
65
add_subdirectory(cli)
66
add_subdirectory(indicator)
67
add_subdirectory(fileitemactionplugin)
68
add_subdirectory(urlhandler)
69
add_subdirectory(nautilus-extension)
70 71 72 73 74 75

option(SMSAPP_ENABLED OFF)
if(SMSAPP_ENABLED)
    find_package(KF5People REQUIRED)
    add_subdirectory(smsapp)
endif()
76 77 78
if(KF5DocTools_FOUND)
    add_subdirectory(doc)
endif()
David Edmundson's avatar
David Edmundson committed
79

Andreas Sturmlechner's avatar
Andreas Sturmlechner committed
80 81 82
if(BUILD_TESTING)
    add_subdirectory(tests)
endif()
83

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