Merge branch 'main' into beta

This commit is contained in:
David Capello 2022-08-02 19:08:36 -03:00
commit 207c1c518c
2 changed files with 12 additions and 3 deletions

View File

@ -245,8 +245,15 @@ add_definitions(-DPNG_NO_MMX_CODE) # Do not use MMX optimizations in PNG code
# libwebp
if(ENABLE_WEBP)
set(WEBP_LIBRARIES webp webpdemux libwebpmux)
set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
# Use libwebp from Skia
if(LAF_BACKEND STREQUAL "skia")
find_library(WEBP_LIBRARIES webp
PATH "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH)
set(WEBP_INCLUDE_DIR "${SKIA_DIR}/third_party/externals/libwebp/src")
else()
set(WEBP_LIBRARIES webp webpdemux libwebpmux)
set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
endif()
include_directories(${WEBP_INCLUDE_DIR})
endif()
@ -351,6 +358,8 @@ if(ENABLE_DRM)
endif()
add_subdirectory(laf)
message(STATUS "aseprite libwebp: ${WEBP_LIBRARIES}")
# LAF libraries + Aseprite are compiled with config.h
target_include_directories(laf-base PUBLIC src)
target_compile_definitions(laf-base PUBLIC HAVE_CONFIG_H)

View File

@ -33,7 +33,7 @@ if(NOT USE_SHARED_GIFLIB)
add_subdirectory(giflib)
endif()
if(ENABLE_WEBP)
if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia")
set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.")
set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities.")
set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool.")