From 4c825252ed85c8ebeeb980e540ef3a6bdfb718d8 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 11 Oct 2023 18:03:20 -0400 Subject: [PATCH] xo-cmake: + xo_add_headeronly_library() --- cmake/xo_cxx.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/xo_cxx.cmake b/cmake/xo_cxx.cmake index f0e2e29b..13ee6b9a 100644 --- a/cmake/xo_cxx.cmake +++ b/cmake/xo_cxx.cmake @@ -108,6 +108,14 @@ macro(xo_add_shared_library target targetversion soversion sources) xo_install_library2(${target}) 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. # do not use for header-only subsystems; see xo_include_headeronly_options2()