Skip to content

Commit 79d8be4

Browse files
Merge pull request queezythegreat#90 from TheMiles/master
Fixing problems with generate_avr_firmware and generate_avr_library
2 parents 3f77bd4 + a246639 commit 79d8be4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cmake/Platform/Arduino.cmake

+11-3
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,14 @@ function(GENERATE_AVR_LIBRARY INPUT_NAME)
429429
set( INPUT_LIBS "LIBS ${INPUT_LIBS}" )
430430
endif()
431431

432+
if(INPUT_HDRS)
433+
list(INSERT INPUT_HDRS 0 "HDRS")
434+
endif()
435+
if(INPUT_LIBS)
436+
list(INSERT INPUT_LIBS 0 "LIBS")
437+
endif()
438+
439+
432440
generate_arduino_library( ${INPUT_NAME}
433441
NO_AUTOLIBS
434442
MANUAL
@@ -546,13 +554,13 @@ function(GENERATE_AVR_FIRMWARE INPUT_NAME)
546554
required_variables(VARS INPUT_BOARD INPUT_SRCS MSG "must define for target ${INPUT_NAME}")
547555

548556
if(INPUT_HDRS)
549-
set( INPUT_HDRS "SRCS ${INPUT_HDRS}" )
557+
list(INSERT INPUT_HDRS 0 "HDRS")
550558
endif()
551559
if(INPUT_LIBS)
552-
set( INPUT_LIBS "LIBS ${INPUT_LIBS}" )
560+
list(INSERT INPUT_LIBS 0 "LIBS")
553561
endif()
554562
if(INPUT_AFLAGS)
555-
set( INPUT_AFLAGS "AFLAGS ${INPUT_AFLAGS}" )
563+
list(INSERT INPUT_AFLAGS 0 "AFLAGS")
556564
endif()
557565

558566
generate_arduino_firmware( ${INPUT_NAME}

0 commit comments

Comments
 (0)