diff --git a/env_support/cmake/custom.cmake b/env_support/cmake/custom.cmake index b8e91c00b..21d8811fa 100644 --- a/env_support/cmake/custom.cmake +++ b/env_support/cmake/custom.cmake @@ -99,26 +99,25 @@ if("${INC_INSTALL_DIR}" STREQUAL "") set(INC_INSTALL_DIR "include/lvgl") endif() -set(CMAKE_INSTALL_PREFIX .) #Install headers install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${INC_INSTALL_DIR}/" + DESTINATION "${INC_INSTALL_DIR}" FILES_MATCHING PATTERN "*.h") # Install headers from the LVGL_PUBLIC_HEADERS variable install( FILES ${LVGL_PUBLIC_HEADERS} - DESTINATION "${CMAKE_INSTALL_PREFIX}/${INC_INSTALL_DIR}/" + DESTINATION "${INC_INSTALL_DIR}/" ) # install example headers if(NOT LV_CONF_BUILD_DISABLE_EXAMPLES) install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/examples" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${INC_INSTALL_DIR}/" + DESTINATION "${INC_INSTALL_DIR}" FILES_MATCHING PATTERN "*.h") endif() @@ -127,7 +126,7 @@ endif() if(NOT LV_CONF_BUILD_DISABLE_DEMOS) install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/demos" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${INC_INSTALL_DIR}/" + DESTINATION "${INC_INSTALL_DIR}" FILES_MATCHING PATTERN "*.h") endif() @@ -138,7 +137,7 @@ configure_file("${LVGL_ROOT_DIR}/lv_version.h.in" ${CMAKE_CURRENT_BINARY_DIR}/lv install( FILES "${CMAKE_CURRENT_BINARY_DIR}/lvgl.pc" - DESTINATION "${LIB_INSTALL_DIR}/pkgconfig/") + DESTINATION "share/pkgconfig/") # Install library set_target_properties( @@ -146,9 +145,8 @@ set_target_properties( PROPERTIES OUTPUT_NAME lvgl VERSION ${LVGL_VERSION} SOVERSION ${LVGL_SOVERSION} - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" PUBLIC_HEADER "${LVGL_PUBLIC_HEADERS}") install( @@ -166,9 +164,8 @@ if(NOT LV_CONF_BUILD_DISABLE_THORVG_INTERNAL) PROPERTIES OUTPUT_NAME lvgl_thorvg VERSION ${LVGL_VERSION} SOVERSION ${LVGL_SOVERSION} - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" PUBLIC_HEADER "${LVGL_PUBLIC_HEADERS}") install( @@ -186,9 +183,8 @@ if(NOT LV_CONF_BUILD_DISABLE_DEMOS) PROPERTIES OUTPUT_NAME lvgl_demos VERSION ${LVGL_VERSION} SOVERSION ${LVGL_SOVERSION} - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" PUBLIC_HEADER "${LVGL_PUBLIC_HEADERS}") install( @@ -206,9 +202,8 @@ if(NOT LV_CONF_BUILD_DISABLE_EXAMPLES) PROPERTIES OUTPUT_NAME lvgl_examples VERSION ${LVGL_VERSION} SOVERSION ${LVGL_SOVERSION} - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib" PUBLIC_HEADER "${LVGL_PUBLIC_HEADERS}") install(