fix(build): move AddHardwareDefTarget after all add_definitions (#7185)

Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
This commit is contained in:
Raphael Coeffic
2026-03-16 18:34:39 +01:00
committed by GitHub
co-authored by raphaelcoeffic
parent a4e3275ef3
commit 83bc1e2d82
+5 -4
View File
@@ -121,10 +121,6 @@ add_definitions(
)
set(HW_DESC_JSON ${FLAVOUR}.json)
AddHardwareDefTarget(${HW_DESC_JSON})
# enable generating JSON definition separately for debugging
add_custom_target(hardware_defs DEPENDS ${HW_DESC_JSON}.h)
include(hal/CMakeLists.txt)
@@ -152,6 +148,11 @@ if(ARCH STREQUAL ARM)
include(targets/common/arm/CMakeLists.txt)
endif()
# Generate hardware definitions from hal.h
# Must be after all add_definitions() so the preprocessor sees all flags
AddHardwareDefTarget(${HW_DESC_JSON})
add_custom_target(hardware_defs DEPENDS ${HW_DESC_JSON}.h)
include_directories(targets/${TARGET_DIR} ${THIRDPARTY_DIR})
if(NATIVE_BUILD)