Cmake: Test for register_component, if not found use std cmake add library target

This commit is contained in:
Ruth Ivimey-Cook 2022-05-03 17:36:00 +01:00
parent 7b850130ca
commit bce950b68c
2 changed files with 8 additions and 2 deletions

View File

@ -88,6 +88,12 @@ set(COMPONENT_SRCS "csrc/u8x8_setup.c"
"csrc/u8x8_d_a2printer.c"
"csrc/u8x8_d_st7565.c"
"csrc/u8x8_capture.c")
set(COMPONENT_NAME ".")
register_component()
if(COMMAND register_component)
set(COMPONENT_NAME ".")
register_component()
else()
add_library(u8g2 ${COMPONENT_SRCS})
target_include_directories(u8g2 PUBLIC ${CMAKE_CURRENT_LIST_DIR}/csrc )
endif()

0
doc/ssd13xx.md Normal file
View File