-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (50 loc) · 1.62 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
cmake_minimum_required(VERSION 3.10)
project(xo_macros VERSION 1.0)
# if any are useful for this project..
include (GNUInstallDirs)
set(XO_PROJECT_NAME xo_macros)
# LCOV_EXECUTABLE,GENHTML_EXECUTABLE: needed by xo-cmake-lcov-harness.in
find_program(LCOV_EXECUTABLE NAMES lcov)
find_program(GENHTML_EXECUTABLE NAMES genhtml)
configure_file(
${PROJECT_SOURCE_DIR}/bin/xo-cmake-lcov-harness.in
${PROJECT_BINARY_DIR}/xo-cmake-lcov-harness
@ONLY
)
configure_file(
${PROJECT_SOURCE_DIR}/bin/xo-cmake-config.in
${PROJECT_BINARY_DIR}/xo-cmake-config
@ONLY
)
configure_file(
${PROJECT_SOURCE_DIR}/bin/xo-build.in
${PROJECT_BINARY_DIR}/xo-build
@ONLY
)
install(
FILES
"cmake/xo_macros/xo-project-macros.cmake"
"cmake/xo_macros/xo_cxx.cmake"
"cmake/xo_macros/code-coverage.cmake"
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/xo_macros
)
install(
FILES
"${PROJECT_BINARY_DIR}/xo-cmake-lcov-harness"
"${PROJECT_BINARY_DIR}/xo-cmake-config"
"${PROJECT_BINARY_DIR}/xo-build"
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# The cmake template gen-ccov.in should be expanded in downstream project;
# to pickup downstream project's PROJECT_SOURCE_DIR / PROJECT_BINARY_DIR
#
install(
FILES
"share/xo-macros/gen-ccov.in"
"share/xo-macros/Doxyfile.in"
"share/xo-macros/xo-bootstrap-macros.cmake"
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION ${CMAKE_INSTALL_DATADIR}/xo-macros
)