Skip to content

Commit c6afc0f

Browse files
committed
RPI: cleanup cmake
1 parent ad35d9c commit c6afc0f

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

Arduino.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ function(arduino_library LIB_NAME LIB_PATH)
6565
# For interface libraries, use INTERFACE linkage
6666
target_link_libraries(${LIB_NAME} INTERFACE arduino_emulator)
6767
endif()
68-
if (USE_RPI)
69-
target_link_libraries(${LIB_NAME} PUBLIC gpiod)
70-
endif(USE_RPI)
7168

7269
endif()
7370

@@ -122,9 +119,5 @@ function(arduino_sketch name ino_file)
122119
target_compile_definitions(${name} PUBLIC ${ARG_DEFINITIONS})
123120
endif()
124121

125-
# Add platform-specific libraries
126-
if (USE_RPI)
127-
target_link_libraries(${name} gpiod)
128-
endif(USE_RPI)
129122
endfunction()
130123

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/Arduino.cmake)
6464

6565
if (USE_RPI)
6666
target_compile_options(arduino_emulator PUBLIC -DUSE_RPI)
67+
target_link_libraries(arduino_emulator gpiod)
6768
endif(USE_RPI)
6869

6970
if (USE_REMOTE)

examples/using-arduino-library/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ arduino_library(sam "https://github.com/pschatzmann/arduino-SAM")
44

55
# Use the arduino_sketch function to build the example with additional libraries
66
arduino_sketch(using-arduino-library using-arduino-library.ino LIBRARIES sam)
7+

0 commit comments

Comments
 (0)