diff --git a/.gitignore b/.gitignore index 3314af9..796b96d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ /build -/include/clippson/*.h -/include/clippson/json* diff --git a/CMakeLists.txt b/CMakeLists.txt index 62ac5a8..4d3aac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,19 +42,12 @@ endfunction() git_fetch(clipp v1.2.3.1 heavywatal/clipp) git_fetch(json v3.11.3 heavywatal/json) -set(subrepo_files - ${clipp_SOURCE_DIR}/include/clipp.h - ${json_SOURCE_DIR}/src/json.hpp - ${json_SOURCE_DIR}/src/json_fwd.hpp -) -foreach(file IN LISTS subrepo_files) - configure_file(${file} ${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/ COPYONLY) -endforeach() - add_library(${PROJECT_NAME} INTERFACE) add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) target_include_directories(${PROJECT_NAME} INTERFACE $ + $ + $ $ ) target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17) @@ -62,6 +55,12 @@ target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17) install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) +install(FILES + ${clipp_SOURCE_DIR}/include/clipp.h + ${json_SOURCE_DIR}/src/json.hpp + ${json_SOURCE_DIR}/src/json_fwd.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} +) install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-config )