forked from Luwx/Lightly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (52 loc) · 2.32 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
cmake_minimum_required(VERSION 3.20)
project(lightly)
set(PROJECT_VERSION "0.44")
set(PROJECT_VERSION_MAJOR 6)
set(KF6_MIN_VERSION "6.0.0")
set(QT_MIN_VERSION "6.4.0")
include(GenerateExportHeader)
include(WriteBasicConfigVersionFile)
include(FeatureSummary)
find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake)
include(CMakePackageConfigHelpers)
include(ECMInstallIcons)
include(KDEInstallDirs6)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEClangFormat)
include(GtkUpdateIconCache)
find_package(KF6FrameworkIntegration ${KF6_MIN_VERSION} CONFIG )
set_package_properties(KF${QT_MAJOR_VERSION}FrameworkIntegration PROPERTIES
DESCRIPTION "KF6 Framework Integration"
URL "https://projects.kde.org/projects/frameworks/frameworkintegration"
TYPE OPTIONAL
PURPOSE "Required to use KStyle convenience functionalities in style")
option(WITH_DECORATIONS "Build Lightly window decorations for KWin" ON)
if(WITH_DECORATIONS)
find_package(KDecoration2 REQUIRED)
add_subdirectory(kdecoration)
endif()
add_subdirectory(colors)
add_subdirectory(liblightlycommon)
add_subdirectory(kstyle)
add_subdirectory(misc)
include(ECMSetupVersion)
ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX LIGHTLY
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/LightlyConfigVersion.cmake"
)
# create a Config.cmake and a ConfigVersion.cmake file and install them
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Lightly")
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/LightlyConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/LightlyConfig.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}/LightlyConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/LightlyConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)