build: always enable CMake install rule in default configuration
This will simplify packaging recipes, it's not mandatory,
but there is no reason to have it as an option if it does
not imply any regressions.
Relate-to:
@@ -85,25 +85,20 @@ else()
target_compile_options(lvgl_interface INTERFACE -Wno-unused-function)
else(MICROPY_DIR)
# without micropython, build lvgl and examples libs normally
+ # default linux build uses this scope
add_library(lvgl STATIC ${SOURCES})
add_library(lvgl_examples STATIC ${EXAMPLE_SOURCES})
- endif(MICROPY_DIR)
-
-endif()
-option(install "Enable install to system" OFF)
-if(install)
include_directories(${CMAKE_SOURCE_DIR})
+ # 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")
-
if("${LIB_INSTALL_DIR}" STREQUAL "")
set(LIB_INSTALL_DIR "lib")
endif()
-
if("${INC_INSTALL_DIR}" STREQUAL "")
set(INC_INSTALL_DIR "include/lvgl")
endif()
@@ -121,4 +116,9 @@ set_target_properties(lvgl PROPERTIES
install(TARGETS lvgl
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
PUBLIC_HEADER DESTINATION "${INC_INSTALL_DIR}")
-endif(install)
+
+ endif(MICROPY_DIR)
+
+endif()
+
+
