-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (33 loc) · 1.25 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
cmake_minimum_required(VERSION 3.9)
project(cxxtimer VERSION 1.0 LANGUAGES CXX)
add_subdirectory(src)
add_subdirectory(example)
################################################################################
# Testing procedure
################################################################################
include(CTest)
if (BUILD_TESTING) # defined by CTest
add_subdirectory(test)
endif (BUILD_TESTING)
################################################################################
# Installation procedure
################################################################################
# install headers
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION include)
include(CMakePackageConfigHelpers)
# generate the config file
configure_package_config_file(
cmake/cxxtimerConfig.cmake.in
${PROJECT_BINARY_DIR}/cxxtimerConfig.cmake
INSTALL_DESTINATION cmake/cxxtimer)
# generate the version file for the config file
write_basic_package_version_file(
${PROJECT_BINARY_DIR}/cxxtimerConfigVersion.cmake
COMPATIBILITY SameMajorVersion)
install(
FILES ${PROJECT_BINARY_DIR}/cxxtimerTargets.cmake
${PROJECT_BINARY_DIR}/cxxtimerConfig.cmake
${PROJECT_BINARY_DIR}/cxxtimerConfigVersion.cmake
DESTINATION cmake/cxxtimer)