-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
49 lines (38 loc) · 1.68 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
cmake_minimum_required(VERSION 3.18.0 FATAL_ERROR)
# CMP0000: Call the cmake_minimum_required() command at the beginning of the top-level
# CMakeLists.txt file even before calling the project() command.
# The cmake_minimum_required(VERSION) command implicitly invokes the cmake_policy(VERSION)
# command to specify that the current project code is written for the given range of CMake
# versions.
project(lxqt-menu-data)
include(GNUInstallDirs)
set(LXQTBT_MINIMUM_VERSION "2.1.0")
find_package(lxqt2-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
# Version
set(LXQT_MENU_DATA_MAJOR_VERSION 2)
set(LXQT_MENU_DATA_MINOR_VERSION 1)
set(LXQT_MENU_DATA_PATCH_VERSION 0)
set(LXQT_MENU_DATA_VERSION ${LXQT_MENU_DATA_MAJOR_VERSION}.${LXQT_MENU_DATA_MINOR_VERSION}.${LXQT_MENU_DATA_PATCH_VERSION})
include(LXQtConfigVars)
include(LXQtPreventInSourceBuilds)
include(LXQtTranslate)
include(CMakePackageConfigHelpers)
set(LXQT_MENU_DATA_CMAKE_NAME lxqt-menu-data)
configure_package_config_file(
"${PROJECT_SOURCE_DIR}/cmake/${LXQT_MENU_DATA_CMAKE_NAME}-config.cmake.in"
"${CMAKE_BINARY_DIR}/${LXQT_MENU_DATA_CMAKE_NAME}-config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/${LXQT_MENU_DATA_CMAKE_NAME}"
)
write_basic_package_version_file(
"${CMAKE_BINARY_DIR}/${LXQT_MENU_DATA_CMAKE_NAME}-config-version.cmake"
VERSION ${LXQT_MENU_DATA_VERSION}
COMPATIBILITY AnyNewerVersion
ARCH_INDEPENDENT
)
install(FILES
"${CMAKE_BINARY_DIR}/${LXQT_MENU_DATA_CMAKE_NAME}-config.cmake"
"${CMAKE_BINARY_DIR}/${LXQT_MENU_DATA_CMAKE_NAME}-config-version.cmake"
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/${LXQT_MENU_DATA_CMAKE_NAME}"
COMPONENT Devel
)
add_subdirectory(menu)