Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 378091e

Browse files
committed
Fixed bug where library targets couldn't be created without sources at creation time
1 parent 4662c96 commit 378091e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.8.2)
22

33
project(Examples LANGUAGES C CXX ASM)
44

examples/misc/libraries/late-sources-library/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ project(Late_Source_Library)
44

55
get_board_id(board_id nano atmega328)
66

7+
# Explictly/Manually add a library without any sources at this stage
78
add_arduino_library(adafruit_NeoPixel_Late ${board_id})
89

910
add_arduino_executable(Late_Source_Library ${board_id} late-sources-lib.cpp)
1011

12+
# Complete required sources for the library that was manaully created earlier
1113
target_sources(adafruit_NeoPixel_Late PUBLIC ${CMAKE_CURRENT_LIST_DIR}/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp)
1214
target_include_directories(adafruit_NeoPixel_Late PUBLIC Adafruit_NeoPixel)
1315

0 commit comments

Comments
 (0)