Add install targets

This commit is contained in:
Joost Molenaar 2023-09-30 16:30:01 +02:00
parent 2bc572f8a8
commit 0e788dc396
1 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,7 @@ project(u8g2)
set(COMPONENT_ADD_INCLUDEDIRS csrc)
file(GLOB COMPONENT_SRCS csrc/*.c)
file(GLOB COMPONENT_HDRS csrc/*.h)
if(COMMAND register_component)
set(COMPONENT_NAME ".")
@ -11,3 +12,9 @@ else()
add_library(u8g2 ${COMPONENT_SRCS})
target_include_directories(u8g2 PUBLIC ${CMAKE_CURRENT_LIST_DIR}/csrc )
endif()
install(TARGETS u8g2
ARCHIVE DESTINATION lib)
install(FILES ${COMPONENT_HDRS}
DESTINATION include/u8g2)