| 1 |
cmake_minimum_required(VERSION 3.19) |
| 2 |
project(trie) |
| 3 |
|
| 4 |
set(TARGET trie) |
| 5 |
set(OUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) |
| 6 |
|
| 7 |
# ================================================================================================== |
| 8 |
# Sources and headers |
| 9 |
# ================================================================================================== |
| 10 |
set(PUBLIC_HDRS |
| 11 |
${OUR_DIR}/tsl/htrie_hash.h |
| 12 |
${OUR_DIR}/tsl/htrie_map.h |
| 13 |
${OUR_DIR}/tsl/htrie_set.h |
| 14 |
) |
| 15 |
|
| 16 |
# ================================================================================================== |
| 17 |
# Include and target definitions |
| 18 |
# ================================================================================================== |
| 19 |
include_directories(${OUR_DIR}/tsl) |
| 20 |
|
| 21 |
add_library(${TARGET} INTERFACE) |
| 22 |
target_sources(${TARGET} INTERFACE ${PUBLIC_HDRS}) |
| 23 |
target_include_directories(${TARGET} INTERFACE ${OUR_DIR}) |
| 24 |
|
| 25 |
# ================================================================================================== |
| 26 |
# Installation |
| 27 |
# ================================================================================================== |
| 28 |
install(FILES ${PUBLIC_HDRS} DESTINATION include/${TARGET}) |