xo-cmake: comments on modules vs configs
This commit is contained in:
parent
0af7a50810
commit
5d020e5928
2 changed files with 5 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
# dependencies
|
||||
stdenv, cmake, catch2,
|
||||
stdenv, cmake, catch2, replxx,
|
||||
|
||||
xo-cmake, xo-expression, xo-tokenizer
|
||||
} :
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue