-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
43 lines (35 loc) · 937 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
43 lines (35 loc) · 937 Bytes
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.15)
project(xcmath LANGUAGES CXX C VERSION 0.1.0)
option(BUILD_TESTING "Build tests" OFF)
option(BUILD_EXAMPLES "Build examples" OFF)
if(BUILD_TESTING)
enable_testing()
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(${CMAKE_SOURCE_DIR}/cmake/format.cmake)
add_subdirectory(third_party/xcmixin)
add_subdirectory(xcmath)
if(${BUILD_EXAMPLES})
add_subdirectory(examples/usage)
endif()
if(${BUILD_TESTING})
add_subdirectory(test)
endif()
install(TARGETS xcmath EXPORT xcmath)
install(
EXPORT xcmath
NAMESPACE xcmath::
FILE xcmathConfig.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/xcmath
)
install(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/xcmath/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/xcmath/
FILES_MATCHING
PATTERN "*.hpp"
)