Skip to content

Commit 00006b9

Browse files
committed
Arduino.cmake
1 parent 7e80091 commit 00006b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Arduino.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ function(arduino_library LIB_NAME LIB_PATH)
5151
target_compile_options(${LIB_NAME} PRIVATE -DPROGMEM=)
5252
# Ensure C files are compiled as C, not C++
5353
set_target_properties(${LIB_NAME} PROPERTIES LINKER_LANGUAGE C)
54+
target_include_directories(${LIB_NAME} PUBLIC ${INC_DIR})
5455
else()
5556
# Create a header-only interface library if no source files
5657
add_library(${LIB_NAME} INTERFACE)
58+
target_include_directories(${LIB_NAME} INTERFACE ${INC_DIR})
5759
endif()
58-
target_include_directories(${LIB_NAME} PUBLIC ${INC_DIR})
5960
# Link arduino_emulator to propagate its include directories
6061
if(TARGET arduino_emulator)
6162
if(SRC_FILES)

0 commit comments

Comments
 (0)