forked from Luwx/Lightly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (45 loc) · 1.99 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
cmake_minimum_required(VERSION 3.0)
project(lightly)
set(PROJECT_VERSION "0.43")
set(PROJECT_VERSION_MAJOR 5)
set(KF5_MIN_VERSION "5.78.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} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEClangFormat)
include(GtkUpdateIconCache)
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 "${CMAKECONFIG_INSTALL_PREFIX}/Lightly")
ecm_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)