Skip to content

Commit

Permalink
One more clause needed for IDF SDK 5
Browse files Browse the repository at this point in the history
  • Loading branch information
fadushin committed Dec 16, 2023
1 parent 7298577 commit 2abd182
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,19 @@ set(ATOMVM_NEOPIXEL_COMPONENT_SRCS
"nifs/led_strip_rmt_ws2812.c"
)

# WHOLE_ARCHIVE option is supported only with esp-idf 5.x
# A link option will be used with esp-idf 4.x
if(IDF_VERSION_MAJOR EQUAL 5)
set(OPTIONAL_WHOLE_ARCHIVE WHOLE_ARCHIVE)
else()
set(OPTIONAL_WHOLE_ARCHIVE "")
endif()

idf_component_register(
SRCS ${ATOMVM_NEOPIXEL_COMPONENT_SRCS}
INCLUDE_DIRS "nifs/include"
PRIV_REQUIRES "libatomvm" "avm_sys" "driver"
${OPTIONAL_WHOLE_ARCHIVE}
)

if (IDF_VERSION_MAJOR EQUAL 4)
Expand Down

0 comments on commit 2abd182

Please sign in to comment.