trying to fix building on esp-idf
This commit is contained in:
parent
dc9fc73ddf
commit
a63fe0d97a
|
@ -1,16 +1,22 @@
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(u8g2)
|
|
||||||
|
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS csrc)
|
set(COMPONENT_ADD_INCLUDEDIRS csrc)
|
||||||
file(GLOB COMPONENT_SRCS csrc/*.c)
|
file(GLOB COMPONENT_SRCS csrc/*.c)
|
||||||
file(GLOB COMPONENT_HDRS csrc/*.h)
|
file(GLOB COMPONENT_HDRS csrc/*.h)
|
||||||
|
|
||||||
|
if(COMMAND idf_component_register)
|
||||||
|
idf_component_register(SRCS "${COMPONENT_SRCS}" INCLUDE_DIRS csrc)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project(u8g2)
|
||||||
|
|
||||||
if(COMMAND register_component)
|
if(COMMAND register_component)
|
||||||
set(COMPONENT_NAME ".")
|
set(COMPONENT_NAME ".")
|
||||||
register_component()
|
register_component()
|
||||||
else()
|
else()
|
||||||
add_library(u8g2 ${COMPONENT_SRCS})
|
add_library(u8g2 ${COMPONENT_SRCS})
|
||||||
target_include_directories(u8g2 PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/csrc>" "$<INSTALL_INTERFACE:include>")
|
target_include_directories(u8g2 PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/csrc>" "$<INSTALL_INTERFACE:include>")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS u8g2
|
install(TARGETS u8g2
|
||||||
|
|
Loading…
Reference in New Issue