-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
71 lines (61 loc) · 1.87 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
70
71
cmake_minimum_required(VERSION 3.24)
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
endif()
if(POLICY CMP0069)
cmake_policy(SET CMP0069 NEW)
endif()
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
project(Fern LANGUAGES CXX)
set(${PROJECT_NAME}_ORGANISATION_NAME "Geoneric")
set(${PROJECT_NAME}_COPYRIGHT "2010-now Geoneric")
set(${PROJECT_NAME}_PROJECT_NAME "${PROJECT_NAME}")
set(${PROJECT_NAME}_HOMEPAGE "https://www.geoneric.eu")
set(${PROJECT_NAME}_MAJOR_VERSION "0")
set(${PROJECT_NAME}_MINOR_VERSION "0")
set(${PROJECT_NAME}_PATCH_VERSION "0")
set(${PROJECT_NAME}_PRE_RELEASE_VERSION "-rc.1")
set(${PROJECT_NAME}_VERSION
"${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_VERSION}${${PROJECT_NAME}_PRE_RELEASE_VERSION}")
set(CMAKE_MODULE_PATH
$ENV{CMAKE_MODULE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/devbase/cmake
${CMAKE_CURRENT_SOURCE_DIR}/environment/cmake
)
include(Fern)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/test_run_prolog.sh.in
${CMAKE_CURRENT_BINARY_DIR}/test_run_prolog.sh
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/test_run_epilog.sh.in
${CMAKE_CURRENT_BINARY_DIR}/test_run_epilog.sh
)
# Order matters. Some doc targets depend on source targets.
add_subdirectory(environment)
add_subdirectory(source)
add_subdirectory(document)
install(
EXPORT fern_targets
FILE fern_targets.cmake
NAMESPACE fern::
DESTINATION lib/cmake/fern
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file("fern_config_version.cmake"
VERSION ${${PROJECT_NAME}_VERSION}
COMPATIBILITY SameMajorVersion
)
install(
FILES
"fern-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/fern_config_version.cmake"
DESTINATION
lib/cmake/fern
)