diff --git a/cmake/xo_cxx.cmake b/cmake/xo_cxx.cmake index d2f95936..6728db82 100644 --- a/cmake/xo_cxx.cmake +++ b/cmake/xo_cxx.cmake @@ -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)