xo-cmake: + xo_install_library2()

This commit is contained in:
Roland Conybeare 2023-09-27 13:18:59 -04:00
commit 795d5ddb69

View file

@ -49,6 +49,22 @@ macro(xo_install_include_tree)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include)
endmacro()
# ----------------------------------------------------------------
# use this for a subdir that builds a library
# and supports find_package()
#
macro(xo_install_library2 target)
install(
TARGETS ${target}
EXPORT ${target}Targets
LIBRARY DESTINATION lib COMPONENT Runtime
ARCHIVE DESTINATION lib COMPONENT Development
RUNTIME DESTINATION bin COMPONENT Runtime
PUBLIC_HEADER DESTINATION include COMPONENT Development
BUNDLE DESTINATION bin COMPONENT Runtime
)
endmacro()
# ----------------------------------------------------------------
#
# dependency on an xo library (including header-only libraries)