(Android) Separated the build artifacts for the Full and Lite releases

This commit is contained in:
Leon Styhre 2024-01-15 19:20:44 +01:00
parent 3964cb2bcf
commit c9ff27b3be
3 changed files with 28 additions and 5 deletions

View file

@ -615,8 +615,13 @@ endif()
if(NOT WIN32) if(NOT WIN32)
# SVG rendering library LunaSVG and Lottie animation library rlottie. # SVG rendering library LunaSVG and Lottie animation library rlottie.
if(ANDROID) if(ANDROID)
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI}/liblunasvg.a) if(ANDROID_LITE_RELEASE)
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI}/librlottie.a) set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/android_lite_${ANDROID_ABI}/liblunasvg.a)
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/android_lite_${ANDROID_ABI}/librlottie.a)
else()
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI}/liblunasvg.a)
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI}/librlottie.a)
endif()
else() else()
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/liblunasvg.a) set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/liblunasvg.a)
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/librlottie.a) set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${PROJECT_SOURCE_DIR}/librlottie.a)

View file

@ -184,5 +184,11 @@ add_library(es-core STATIC ${CORE_SOURCES} ${CORE_HEADERS})
target_link_libraries(es-core ${COMMON_LIBRARIES}) target_link_libraries(es-core ${COMMON_LIBRARIES})
if(ANDROID) if(ANDROID)
set_target_properties(es-core PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI}) if(ANDROID_LITE_RELEASE)
set_target_properties(es-core PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/../android_lite_${ANDROID_ABI})
else()
set_target_properties(es-core PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/../android_${ANDROID_ABI})
endif()
endif() endif()

View file

@ -41,7 +41,13 @@ if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
endif() endif()
if(ANDROID) if(ANDROID)
set_target_properties(lunasvg PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI}) if(ANDROID_LITE_RELEASE)
set_target_properties(lunasvg PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/android_lite_${ANDROID_ABI})
else()
set_target_properties(lunasvg PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI})
endif()
endif() endif()
# Disable threading support for rlottie as this functionality actually leads to far worse # Disable threading support for rlottie as this functionality actually leads to far worse
@ -65,7 +71,13 @@ else()
endif() endif()
if(ANDROID) if(ANDROID)
set_target_properties(rlottie PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI}) if(ANDROID_LITE_RELEASE)
set_target_properties(rlottie PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/android_lite_${ANDROID_ABI})
else()
set_target_properties(rlottie PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_SOURCE_DIR}/android_${ANDROID_ABI})
endif()
endif() endif()
# Build LunaSVG before rlottie. # Build LunaSVG before rlottie.