mirror of
https://github.com/nopnop2002/esp-idf-ssd1306.git
synced 2024-10-03 18:18:47 -04:00
17 lines
489 B
CMake
17 lines
489 B
CMake
set(component_srcs "ssd1306.c" "ssd1306_spi.c")
|
|
|
|
# get IDF version for comparison
|
|
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")
|
|
|
|
if(idf_version VERSION_GREATER_EQUAL "5.2")
|
|
if(CONFIG_LEGACY_DRIVER)
|
|
list(APPEND component_srcs "ssd1306_i2c_legacy.c")
|
|
else()
|
|
list(APPEND component_srcs "ssd1306_i2c_new.c")
|
|
endif()
|
|
else()
|
|
list(APPEND component_srcs "ssd1306_i2c_legacy.c")
|
|
endif()
|
|
|
|
idf_component_register(SRCS "${component_srcs}" PRIV_REQUIRES driver INCLUDE_DIRS ".")
|