xo-cmake: comments on modules vs configs

This commit is contained in:
Roland Conybeare 2025-07-05 16:16:47 -05:00
commit ac255de1d2

View file

@ -1348,11 +1348,14 @@ endmacro()
# e.g.
# add_library(foo ..) or add_executable(foo ...)
# then
# xo_external_namespaced_dependency(foo Catch2 Catch2::Catch2)
# xo_external_target_dependency(foo Catch2 Catch2::Catch2)
# equivalent to
# find_package(Catch2 CONFIG REQUIRED)
# target_link_libraries(foo PUBLIC Catch2::Catch2)
#
# NOTE: this won't work for builtin module targets. For Threads we need just
# find_package(${pkg} Threads)
#
macro(xo_external_target_dependency target pkg pkgtarget)
message("-- [${target}] find_package(${pkg}) (xo_external_target_dependency)")
find_package(${pkg} CONFIG REQUIRED)