cmake: add zephyr_link_libraries_ifdef
Link libraries only when config is defined. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
f4ddb62bfa
commit
2bbe6af07c
1 changed files with 6 additions and 0 deletions
|
@ -679,6 +679,12 @@ function(zephyr_cc_option_ifdef feature_toggle)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(zephyr_ld_option_ifdef feature_toggle)
|
||||||
|
if(${${feature_toggle}})
|
||||||
|
zephyr_ld_options(${ARGN})
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
function(zephyr_link_libraries_ifdef feature_toggle)
|
function(zephyr_link_libraries_ifdef feature_toggle)
|
||||||
if(${${feature_toggle}})
|
if(${${feature_toggle}})
|
||||||
zephyr_link_libraries(${ARGN})
|
zephyr_link_libraries(${ARGN})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue