-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
69 lines (53 loc) · 2.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cmake_minimum_required(VERSION 3.16)
project(breezeway)
set(PROJECT_VERSION "5.24.7")
set(PROJECT_VERSION_MAJOR 5)
set(KF5_MIN_VERSION "5.86")
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
set(QT_MIN_VERSION "5.15.0")
include(GenerateExportHeader)
include(WriteBasicConfigVersionFile)
include(FeatureSummary)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
include(CMakePackageConfigHelpers)
include(ECMInstallIcons)
include(ECMPackageConfigHelpers)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEClangFormat)
include(GtkUpdateIconCache)
option(WITH_DECORATIONS "Build Breezeway window decorations for KWin" ON)
if(WIN32 OR APPLE)
set(WITH_DECORATIONS OFF)
endif()
if(WITH_DECORATIONS)
find_package(KDecoration2 REQUIRED)
add_subdirectory(kdecoration)
endif()
add_subdirectory(libbreezewaycommon)
if(EXISTS ${CMAKE_SOURCE_DIR}/po AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/po)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
ki18n_install(po)
endif()
include(ECMSetupVersion)
ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX BREEZEWAY
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/BreezewayConfigVersion.cmake"
)
# create a Config.cmake and a ConfigVersion.cmake file and install them
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Breezeway")
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/BreezewayConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/BreezewayConfig.cmake"
PATH_VARS KDE_INSTALL_FULL_DATADIR
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/BreezewayConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/BreezewayConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)