diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aae816c4b..666c9079c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -555,10 +555,11 @@ add_custom_command( -DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/version.h -DVERSION_TYPE=KERNEL -DVERSION_FILE=${ZEPHYR_BASE}/VERSION - -DKERNEL_VERSION_CUSTOMIZATION="${KERNEL_VERSION_CUSTOMIZATION}" + -DKERNEL_VERSION_CUSTOMIZATION="$" ${build_version_argument} -P ${ZEPHYR_BASE}/cmake/gen_version_h.cmake DEPENDS ${ZEPHYR_BASE}/VERSION ${git_dependency} + COMMAND_EXPAND_LISTS ) add_custom_target(version_h DEPENDS ${PROJECT_BINARY_DIR}/include/generated/version.h) @@ -569,10 +570,11 @@ if(EXISTS ${APPLICATION_SOURCE_DIR}/VERSION) -DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/app_version.h -DVERSION_TYPE=APP -DVERSION_FILE=${APPLICATION_SOURCE_DIR}/VERSION - -DAPP_VERSION_CUSTOMIZATION="${APP_VERSION_CUSTOMIZATION}" + -DAPP_VERSION_CUSTOMIZATION="$" ${build_version_argument} -P ${ZEPHYR_BASE}/cmake/gen_version_h.cmake DEPENDS ${APPLICATION_SOURCE_DIR}/VERSION ${git_dependency} + COMMAND_EXPAND_LISTS ) add_custom_target(app_version_h DEPENDS ${PROJECT_BINARY_DIR}/include/generated/app_version.h) add_dependencies(zephyr_interface app_version_h)