Skip to content

Commit 01e3e9f

Browse files
committed
cmake: bundle_version: use the correct bundle version
(major << 24) | (minor << 16) | (patchlevel << 8) | (rc) -- Bundle Version: 80.15.4.1 (0x500f0401) Signed-off-by: Chris Friedt <[email protected]>
1 parent 16648aa commit 01e3e9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/bundle_version.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ set(VERSION_FILE ${ZEPHYR_CURRENT_MODULE_DIR}/VERSION)
55
set(VERSION_TYPE BUNDLE)
66
include(${ZEPHYR_BASE}/cmake/modules/version.cmake)
77
string(REGEX REPLACE "[^0-9]+" "" BUNDLE_VERSION_EXTRA_NUM "${BUNDLE_VERSION_EXTRA}")
8+
math(EXPR BUNDLE_VERSION_INT "(${BUNDLE_VERSION_MAJOR} << 24) + (${BUNDLE_VERSION_MINOR} << 16) +\
9+
(${BUNDLE_PATCHLEVEL} << 8) + (${BUNDLE_VERSION_EXTRA_NUM})")
10+
math(EXPR BUNDLE_VERSION_NUMBER "${BUNDLE_VERSION_INT}" OUTPUT_FORMAT HEXADECIMAL)
811
set(BUNDLE_VERSION_STRING "${BUNDLE_VERSION_MAJOR}.${BUNDLE_VERSION_MINOR}.${BUNDLE_PATCHLEVEL}.${BUNDLE_VERSION_EXTRA_NUM}")
912
if("${BUNDLE_VERSION_STRING}" STREQUAL "...")
1013
message(FATAL_ERROR "Unable to extract bundle version")

0 commit comments

Comments
 (0)