Skip to content

Commit ffe017a

Browse files
committed
Added FW versions to dai::build
1 parent 265d6dd commit ffe017a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,13 +431,14 @@ target_link_libraries(${TARGET_CORE_NAME}
431431
ZLIB::zlib
432432
)
433433

434-
# Add compile definitions
434+
# Add compile & CMake definitions
435+
set(DEPTHAI_DEVICE_VERSION "${DEPTHAI_DEVICE_SIDE_COMMIT}")
435436
target_compile_definitions(${TARGET_CORE_NAME}
436437
PRIVATE
437438
# XLink required define
438439
__PC__
439440
# Add depthai-device version
440-
DEPTHAI_DEVICE_VERSION="${DEPTHAI_DEVICE_SIDE_COMMIT}"
441+
DEPTHAI_DEVICE_VERSION="${DEPTHAI_DEVICE_VERSION}"
441442
# Add depthai-bootloader version
442443
DEPTHAI_BOOTLOADER_VERSION="${DEPTHAI_BOOTLOADER_VERSION}"
443444
)

cmake/version.hpp.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ namespace build
1616
constexpr static const char* COMMIT = "${BUILD_COMMIT}";
1717
constexpr static const char* COMMIT_DATETIME = "${BUILD_COMMIT_DATETIME}";
1818
constexpr static const char* BUILD_DATETIME = "${BUILD_DATETIME}";
19+
20+
constexpr static const char* DEVICE_VERSION = "${DEPTHAI_DEVICE_VERSION}";
21+
constexpr static const char* BOOTLOADER_VERSION = "${DEPTHAI_BOOTLOADER_VERSION}";
1922
} // namespace build
2023
} // namespace dai

0 commit comments

Comments
 (0)