build: supply indentlog config to cmake customers

This commit is contained in:
Roland Conybeare 2023-10-11 17:42:27 -04:00
commit 03807c5c23
2 changed files with 6 additions and 3 deletions

View file

@ -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)

4
indentlogConfig.cmake.in Normal file
View file

@ -0,0 +1,4 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/indentlogTargets.cmake")
check_required_components("@PROJECT_NAME@")