From a6a436b1feb0baa3ee735d9c900fadd50cce9219 Mon Sep 17 00:00:00 2001 From: graham sanderson Date: Mon, 28 Jun 2021 16:53:38 -0500 Subject: [PATCH] use PUBLIC for pio headers on any target except INTERFACE library --- tools/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 2e908b2..bc93b84 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -27,10 +27,10 @@ function(pico_generate_pio_header TARGET PIO) ) add_dependencies(${TARGET} ${HEADER_GEN_TARGET}) get_target_property(target_type ${TARGET} TYPE) - if ("EXECUTABLE" STREQUAL "${target_type}") - target_include_directories(${TARGET} PRIVATE ${HEADER_DIR}) - else() + if ("INTERFACE_LIBRARY" STREQUAL "${target_type}") target_include_directories(${TARGET} INTERFACE ${HEADER_DIR}) + else() + target_include_directories(${TARGET} PUBLIC ${HEADER_DIR}) endif() endfunction()