diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a780b05..9e53335a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,13 +33,12 @@ add_subdirectory(utest) # header-only library. # see [[https://stackoverflow.com/questions/47718485/install-and-export-interface-only-library-cmake]] # -add_library(indentlog INTERFACE) -xo_include_headeronly_options2(indentlog) +xo_add_headeronly_library(indentlog) # ---------------------------------------------------------------- # standard install + provide find_package() support -xo_install_library2(${PROJECT_NAME}) +xo_install_library2(indentlog) xo_install_include_tree() xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets) diff --git a/indentlogConfig.cmake.in b/indentlogConfig.cmake.in new file mode 100644 index 00000000..cc57615e --- /dev/null +++ b/indentlogConfig.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/indentlogTargets.cmake") +check_required_components("@PROJECT_NAME@")