xo-cmake: + xo_dependency_headeronly + xo_dependency
This commit is contained in:
parent
2b10fec175
commit
8c1bbb0935
1 changed files with 12 additions and 1 deletions
|
|
@ -219,11 +219,22 @@ endmacro()
|
|||
#
|
||||
# dep: name of required dependency, e.g. indentlog
|
||||
#
|
||||
macro(xo_internal_dependency target dep)
|
||||
macro(xo_dependency target dep)
|
||||
find_package(${dep} CONFIG REQUIRED)
|
||||
target_link_libraries(${target} PUBLIC ${dep})
|
||||
endmacro()
|
||||
|
||||
macro(xo_internal_dependency target dep)
|
||||
xo_dependency(target dep)
|
||||
endmacro()
|
||||
|
||||
# dependency on a header-only library
|
||||
#
|
||||
macro(xo_dependency_headeronly target dep)
|
||||
find_package(${dep} CONFIG REQUIRED)
|
||||
target_link_libraries(${target} INTERFACE ${dep})
|
||||
endmacro()
|
||||
|
||||
# dependency on namespaced target
|
||||
# e.g.
|
||||
# add_library(foo ..) or add_executable(foo ...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue