Skip to content

Commit ccdb3f8

Browse files
tejlmandcfriedt
authored andcommitted
cmake: extended zephyr_library_amend description with an extra example
Add some more example to the description of zephyr_library_amend(). This should help users to get input of the extra possibilities that this function provides. See: zephyrproject-rtos#35770 Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent b10287c commit ccdb3f8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cmake/extensions.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,17 @@ endmacro()
436436
# zephyr_library_amend()
437437
# zephyr_libray_add_sources(...)
438438
#
439+
# It is also possible to use generator expression when amending to Zephyr
440+
# libraries.
441+
#
442+
# For example, in case it is required to expose the Zephyr library's folder as
443+
# include path then the following is possible:
444+
# zephyr_library_amend()
445+
# zephyr_library_include_directories($<TARGET_PROPERTY:SOURCE_DIR>)
446+
#
447+
# See the CMake documentation for more target properties or generator
448+
# expressions.
449+
#
439450
macro(zephyr_library_amend)
440451
# This is a macro because we need to ensure the ZEPHYR_CURRENT_LIBRARY and
441452
# following zephyr_library_* calls are executed within the scope of the

0 commit comments

Comments
 (0)