use PUBLIC for pio headers on any target except INTERFACE library

This commit is contained in:
graham sanderson 2021-06-28 16:53:38 -05:00 committed by Luke Wren
parent 7e90980118
commit a6a436b1fe

View File

@ -27,10 +27,10 @@ function(pico_generate_pio_header TARGET PIO)
) )
add_dependencies(${TARGET} ${HEADER_GEN_TARGET}) add_dependencies(${TARGET} ${HEADER_GEN_TARGET})
get_target_property(target_type ${TARGET} TYPE) get_target_property(target_type ${TARGET} TYPE)
if ("EXECUTABLE" STREQUAL "${target_type}") if ("INTERFACE_LIBRARY" STREQUAL "${target_type}")
target_include_directories(${TARGET} PRIVATE ${HEADER_DIR})
else()
target_include_directories(${TARGET} INTERFACE ${HEADER_DIR}) target_include_directories(${TARGET} INTERFACE ${HEADER_DIR})
else()
target_include_directories(${TARGET} PUBLIC ${HEADER_DIR})
endif() endif()
endfunction() endfunction()