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

Lukáš Tinkl's avatar
Lukáš Tinkl committed
3
project(bluedevil)
4
set(PROJECT_VERSION "5.17.80")
David Rosca's avatar
David Rosca committed
5
set(PROJECT_VERSION_MAJOR 5)
Lukáš Tinkl's avatar
Lukáš Tinkl committed
6

7
set(QT_MIN_VERSION "5.12.0")
8
set(KF5_MIN_VERSION "5.62.0")
9

10
11
configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)

12
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
David Rosca's avatar
David Rosca committed
13
14
15
16
17
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
    Widgets
David Rosca's avatar
David Rosca committed
18
    Qml
David Rosca's avatar
David Rosca committed
19
20
    DBus)

21
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
David Rosca's avatar
David Rosca committed
22
23
24
    CoreAddons
    WidgetsAddons
    DBusAddons
David Rosca's avatar
David Rosca committed
25
    Notifications
26
    WindowSystem
David Rosca's avatar
David Rosca committed
27
    IconThemes
David Rosca's avatar
David Rosca committed
28
    Plasma
David Rosca's avatar
David Rosca committed
29
    I18n
David Rosca's avatar
David Rosca committed
30
31
32
    KIO
    BluezQt)

33
find_package(KDED ${KF5_MIN_VERSION} REQUIRED)
David Rosca's avatar
David Rosca committed
34
find_package(SharedMimeInfo REQUIRED)
David Rosca's avatar
David Rosca committed
35
36
37

include(KDEInstallDirs)
include(KDECMakeSettings)
David Rosca's avatar
David Rosca committed
38
include(KDECompilerSettings NO_POLICY_SCOPE)
David Rosca's avatar
David Rosca committed
39
40
include(ECMOptionalAddSubdirectory)
include(FeatureSummary)
41
42
43
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
endif()
afiestas's avatar
afiestas committed
44

David Rosca's avatar
David Rosca committed
45
include_directories(${CMAKE_CURRENT_BINARY_DIR})
46
47

add_subdirectory(src)
David Rosca's avatar
David Rosca committed
48
49

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)