add install options

This commit is contained in:
Shunsuke Kanda 2021-06-29 12:22:55 +09:00
parent ce7bcce26b
commit ccb6341967
2 changed files with 17 additions and 7 deletions

View file

@ -33,10 +33,14 @@ message(STATUS "CXX_FLAGS_RELEASE are ${CMAKE_CXX_FLAGS_RELEASE}")
include_directories(include)
add_subdirectory(sample)
add_subdirectory(tools)
enable_testing()
add_subdirectory(tests)
file(COPY ${CMAKE_SOURCE_DIR}/tests/keys.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/tests)
# Install the library
file(GLOB XCDAT_HEADER_FILES include/xcdat/*.hpp)
install(FILES include/xcdat.hpp DESTINATION include)
install(FILES ${XCDAT_HEADER_FILES} DESTINATION include/xcdat)

View file

@ -1,7 +1,13 @@
add_executable(xcdat_build xcdat_build.cpp)
add_executable(xcdat_lookup xcdat_lookup.cpp)
add_executable(xcdat_decode xcdat_decode.cpp)
add_executable(xcdat_prefix_search xcdat_prefix_search.cpp)
add_executable(xcdat_predictive_search xcdat_predictive_search.cpp)
add_executable(xcdat_enumerate xcdat_enumerate.cpp)
set(XCDAT_FILES
"xcdat_build"
"xcdat_lookup"
"xcdat_decode"
"xcdat_prefix_search"
"xcdat_predictive_search"
"xcdat_enumerate"
)
foreach(XCDAT_FILE ${XCDAT_FILES})
add_executable(${XCDAT_FILE} ${XCDAT_FILE}.cpp)
install(TARGETS ${XCDAT_FILE} RUNTIME DESTINATION bin)
endforeach(XCDAT_FILE)