-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
61 lines (50 loc) · 1.39 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
add_library(Morton INTERFACE)
add_library(UFO::Morton ALIAS Morton)
target_link_libraries(Morton INTERFACE UFO::Math)
include(GNUInstallDirs)
target_include_directories(Morton
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
if(UFO_TESTING)
add_subdirectory(tests)
endif()
if(UFO_DOCS)
add_subdirectory(docs)
endif()
install(TARGETS Morton EXPORT Morton-targets
COMPONENT Morton
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install(EXPORT Morton-targets
FILE "Morton-targets.cmake"
NAMESPACE UFO::
DESTINATION lib/cmake/${PROJECT_NAME}
COMPONENT Morton
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/Morton-config-version.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Morton-config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/Morton-config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/Morton-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/Morton-config-version.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
COMPONENT Morton
)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include
COMPONENT Morton
DESTINATION ${CMAKE_INSTALL_PREFIX}
)