fix(cmake): install headers correctly (#6332)
This commit is contained in:
committed by
GitHub
parent
0c912bdc2b
commit
723f411076
@@ -79,9 +79,15 @@ if(NOT LV_CONF_BUILD_DISABLE_DEMOS)
|
||||
target_link_libraries(lvgl_demos PUBLIC lvgl)
|
||||
endif()
|
||||
|
||||
# Lbrary and headers can be installed to system using make install
|
||||
file(GLOB LVGL_PUBLIC_HEADERS "${CMAKE_SOURCE_DIR}/lv_conf.h"
|
||||
"${CMAKE_SOURCE_DIR}/lvgl.h")
|
||||
# Library and headers can be installed to system using make install
|
||||
file(GLOB LVGL_PUBLIC_HEADERS
|
||||
"${LVGL_ROOT_DIR}/lvgl.h"
|
||||
"${LVGL_ROOT_DIR}/lv_version.h")
|
||||
|
||||
if(NOT LV_CONF_SKIP)
|
||||
list(APPEND LVGL_PUBLIC_HEADERS
|
||||
"${CMAKE_SOURCE_DIR}/lv_conf.h")
|
||||
endif()
|
||||
|
||||
if("${LIB_INSTALL_DIR}" STREQUAL "")
|
||||
set(LIB_INSTALL_DIR "lib")
|
||||
@@ -100,6 +106,12 @@ install(
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h")
|
||||
|
||||
# Install headers from the LVGL_PUBLIC_HEADERS variable
|
||||
install(
|
||||
FILES ${LVGL_PUBLIC_HEADERS}
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${INC_INSTALL_DIR}/"
|
||||
)
|
||||
|
||||
# install example headers
|
||||
if(NOT LV_CONF_BUILD_DISABLE_EXAMPLES)
|
||||
install(
|
||||
|
||||
Reference in New Issue
Block a user