From 708aea8c8c7bcd9fdaa397bb04e8761bf2bd59b8 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Wed, 4 Mar 2020 12:28:11 -0800 Subject: [PATCH] [cmake] add OT_PRIVATE_DEFINES to platform lib build (#4636) --- examples/platforms/cc2538/CMakeLists.txt | 7 ++++++- examples/platforms/simulation/CMakeLists.txt | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) 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}