-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
48 lines (37 loc) · 1.04 KB
/
CMakeLists.txt
File metadata and controls
48 lines (37 loc) · 1.04 KB
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
# DEV_HASH: $Format:%H$
cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0048 NEW)
project(icecream-cpp VERSION 1.0.0 LANGUAGES CXX)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
option(BUILD_TESTING "If ON the tests will be enabled" OFF)
include(CTest)
add_library(icecream-cpp INTERFACE)
install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/icecream.hpp"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
install(
TARGETS icecream-cpp
EXPORT icecream-cpp-targets
)
install(
EXPORT icecream-cpp-targets
FILE icecream-cpp-targets.cmake
NAMESPACE icecream-cpp::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/icecream-cpp"
)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/icecream-cpp-config-version.cmake"
COMPATIBILITY SameMajorVersion
ARCH_INDEPENDENT
)
install(
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/icecream-cpp-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/icecream-cpp-config-version.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/icecream-cpp"
)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()