CMakeLists.txt 2 KB
Newer Older
1
cmake_minimum_required(VERSION 3.16)
2
project(oxygen)
3
set(PROJECT_VERSION "5.24.90")
4
set(PROJECT_VERSION_MAJOR 5)
5

6
include(GenerateExportHeader)
7
8
9
include(WriteBasicConfigVersionFile)
include(FeatureSummary)

10
################# Qt/KDE #################
11
set(QT_MIN_VERSION "5.15.0")
12
set(KF5_MIN_VERSION "5.90")
13
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
14

Ahmad Samir's avatar
Ahmad Samir committed
15
16
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
17
18

find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
19
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} )
20

21
22
23
24
25
26
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)

find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets DBus Quick)
27
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
28
29
    I18n
    Config
30
    CoreAddons
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
    GuiAddons
    WidgetsAddons
    Service
    Completion
    FrameworkIntegration
    WindowSystem)

find_package(XCB COMPONENTS XCB)
set_package_properties(XCB PROPERTIES
    DESCRIPTION "X protocol C-language Binding"
    URL "http://xcb.freedesktop.org"
    TYPE OPTIONAL
    PURPOSE "Required to pass style properties to native Windows on X11 Platform"
)

find_package(KF5Wayland CONFIG)
set(OXYGEN_HAVE_KWAYLAND ${KF5Wayland_FOUND})

if(NOT APPLE)
50
    set(OXYGEN_HAVE_X11 ${XCB_XCB_FOUND})
51
    if (XCB_XCB_FOUND AND QT_MAJOR_VERSION EQUAL "5")
52
        find_package(Qt5 REQUIRED CONFIG COMPONENTS X11Extras)
53
    endif()
54
endif()
55

56

57
58
59
60
61
add_subdirectory(liboxygen)
add_subdirectory(kstyle)
add_subdirectory(color-schemes)
add_subdirectory(cursors)
add_subdirectory(kdecoration)
62

63
64
install(DIRECTORY lookandfeel/ DESTINATION ${KDE_INSTALL_DATADIR}/plasma/look-and-feel/org.kde.oxygen
        PATTERN "Messages.sh" EXCLUDE PATTERN "CMakeLists.txt" EXCLUDE)
65

66
67
# po/ dir added by packaging scripts
if(EXISTS ${CMAKE_SOURCE_DIR}/po AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/po)
68
69
    find_package(KF5I18n CONFIG REQUIRED)
    ki18n_install(po)
70
endif()
71

72
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)