From 0e788dc3967cf0bab6b2a75be2daf8e47ec604b0 Mon Sep 17 00:00:00 2001 From: Joost Molenaar Date: Sat, 30 Sep 2023 16:30:01 +0200 Subject: [PATCH] Add install targets --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae26d9ac..d5bfa47f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)