diff --git a/examples/platforms/cc2538/CMakeLists.txt b/examples/platforms/cc2538/CMakeLists.txt index 50fe9b357..aeb17c4d6 100644 --- a/examples/platforms/cc2538/CMakeLists.txt +++ b/examples/platforms/cc2538/CMakeLists.txt @@ -61,7 +61,12 @@ target_link_libraries(openthread-cc2538 PRIVATE openthread-platform-utils) target_link_options(openthread-cc2538 PUBLIC -T${PROJECT_SOURCE_DIR}/examples/platforms/cc2538/cc2538.ld) target_link_options(openthread-cc2538 PUBLIC -Wl,-Map=$.map) -target_compile_definitions(openthread-cc2538 PUBLIC ${OT_PLATFORM_DEFINES}) +target_compile_definitions(openthread-cc2538 + PUBLIC + ${OT_PLATFORM_DEFINES} + PRIVATE + ${OT_PRIVATE_DEFINES} +) target_compile_options(openthread-cc2538 PRIVATE ${OT_CFLAGS} diff --git a/examples/platforms/simulation/CMakeLists.txt b/examples/platforms/simulation/CMakeLists.txt index 889f26891..cd0ec285c 100644 --- a/examples/platforms/simulation/CMakeLists.txt +++ b/examples/platforms/simulation/CMakeLists.txt @@ -69,7 +69,12 @@ endif() target_link_libraries(openthread-simulation PRIVATE openthread-platform-utils) -target_compile_definitions(openthread-simulation PUBLIC ${OT_PLATFORM_DEFINES}) +target_compile_definitions(openthread-simulation + PUBLIC + ${OT_PLATFORM_DEFINES} + PRIVATE + ${OT_PRIVATE_DEFINES} +) target_compile_options(openthread-simulation PRIVATE ${OT_CFLAGS}