xo-cmake: + xo_add_headeronly_library()

This commit is contained in:
Roland Conybeare 2023-10-11 18:03:20 -04:00
commit 4c825252ed

View file

@ -108,6 +108,14 @@ macro(xo_add_shared_library target targetversion soversion sources)
xo_install_library2(${target}) xo_install_library2(${target})
endmacro() endmacro()
# ----------------------------------------------------------------
# use this for a header-only library
#
macro(xo_add_headeronly_library target)
add_library(${target} INTERFACE)
xo_include_headeronly_options2(${target})
endmacro()
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# use this in subdirs that compile c++ code. # use this in subdirs that compile c++ code.
# do not use for header-only subsystems; see xo_include_headeronly_options2() # do not use for header-only subsystems; see xo_include_headeronly_options2()