-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
39 lines (27 loc) · 961 Bytes
/
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
cmake_minimum_required(VERSION 3.15)
project (MHTR)
option(BUILD_TESTS "Build tests" ON)
set(CMAKE_CXX_STANDARD 17)
include(cmake/BuildHelper.cmake)
include(cmake/PlatformInfo.cmake)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BIN_OUTPUT})
set(CMAKE_PDB_OUTPUT_DIRECTORY ${BIN_OUTPUT})
set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(IFACE_INCLUDE_DIR $<BUILD_INTERFACE:${INCLUDE_DIR}> $<INSTALL_INTERFACE:include>)
set(MHTR_INCLUDE_DIR ${INCLUDE_DIR}/MHTR)
add_subdirectory(vendor)
add_subdirectory(src)
add_subdirectory(plugin)
if(BUILD_TESTS)
add_subdirectory(tests)
endif()
#####################
# Export Targets #
#####################
install(DIRECTORY ${MHTR_INCLUDE_DIR}
DESTINATION include)
configure_file(cmake/MHTRConfig.in.cmake ${CMAKE_CURRENT_BINARY_DIR}/MHTRConfig.cmake @ONLY)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/MHTRConfig.cmake
DESTINATION lib/cmake/MHTR)