Skip to content

Commit b4f389c

Browse files
joerchannordicjm
authored andcommitted
[nrf fromlist] cmake: kconfig: Add APP_DIR to kconfig environment
Add APP_DIR as a kconfig environment variable. This is useful in cases where you want to set a config path relative to the directory of the application. An example of this is how many sysbuild.cmake files sets the source directory like this: ExternalZephyrProject_Add( APPLICATION remote SOURCE_DIR ${APP_DIR}/remote BOARD ${SB_CONFIG_REMOTE_BOARD} ) The same however cannot be done in Kconfig.sysbuild: config NETCORE_IMAGE_PATH default "${APP_DIR}/<image_path>" if NETCORE_ABC Instead they must use ZEPHYR_MY_MODULE_MODULE_DIR, however not all applications are part of a zephyr module. Upstream PR #: 92674 Signed-off-by: Joakim Andersson <joerchan@gmail.com>
1 parent 1e9016c commit b4f389c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/modules/kconfig.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ set(COMMON_KCONFIG_ENV_SETTINGS
142142
APPVERSION=${APP_VERSION_STRING}
143143
APP_VERSION_EXTENDED_STRING=${APP_VERSION_EXTENDED_STRING}
144144
APP_VERSION_TWEAK_STRING=${APP_VERSION_TWEAK_STRING}
145+
APP_DIR=${APP_DIR}
145146
CONFIG_=${KCONFIG_NAMESPACE}_
146147
KCONFIG_CONFIG=${DOTCONFIG}
147148
KCONFIG_BOARD_DIR=${KCONFIG_BOARD_DIR}

0 commit comments

Comments
 (0)