Cmake: Test for register_component, if not found use std cmake add library target
This commit is contained in:
parent
7b850130ca
commit
bce950b68c
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue