1
0

build(manifest): Another attemp at Skia dependencies and adjusting library linking

This commit is contained in:
Jose Daniel G. Percy 2025-05-07 12:16:35 +08:00
parent 7fae6c2d88
commit a12d29ca1f
2 changed files with 27 additions and 9 deletions

View File

@ -256,18 +256,17 @@ modules:
# -DUSE_SHARED_WEBP=OFF # Unused by Aseprite's CMake # -DUSE_SHARED_WEBP=OFF # Unused by Aseprite's CMake
- -DUSE_SHARED_FREETYPE=OFF # Bundled static with Skia - -DUSE_SHARED_FREETYPE=OFF # Bundled static with Skia
- -DUSE_SHARED_HARFBUZZ=OFF # Bundled static with Skia - -DUSE_SHARED_HARFBUZZ=OFF # Bundled static with Skia
# The following explicit paths were unused by Aseprite's CMake. # The following explicit paths are generally handled by FindSkia.cmake when SKIA_DIR is set
# Aseprite likely finds these via Skia's CMake config or other means.
# - -DWebP_INCLUDE_DIRS=/app/third_party/externals/libwebp/src # - -DWebP_INCLUDE_DIRS=/app/third_party/externals/libwebp/src
# - -DWebP_LIBRARIES=/app/lib/libwebp.a # - -DWebP_LIBRARIES=/app/lib/libwebp.a
# - -DJPEG_INCLUDE_DIRS=/app/third_party/externals/libjpeg-turbo # - -DJPEG_INCLUDE_DIRS=/app/third_party/externals/libjpeg-turbo
# - -DJPEG_LIBRARIES=/app/lib/libjpeg.a # - -DJPEG_LIBRARIES=/app/lib/libjpeg.a
- -DFreetype_INCLUDE_DIRS=/app/third_party/externals/freetype/include # - -DFreetype_INCLUDE_DIRS=/app/third_party/externals/freetype/include # Handled by FindSkia.cmake via SKIA_DIR
- -DFreetype_LIBRARIES=/app/lib/libfreetype.a # - -DFreetype_LIBRARIES=/app/lib/libfreetype2.a # Handled by FindSkia.cmake
- -DFreetype_LIBRARY=/app/lib/libfreetype.a # - -DFreetype_LIBRARY=/app/lib/libfreetype2.a # Handled by FindSkia.cmake
- -DHarfBuzz_INCLUDE_DIRS=/app/third_party/externals/harfbuzz/src # - -DHarfBuzz_INCLUDE_DIRS=/app/third_party/externals/harfbuzz/src # Handled by FindSkia.cmake via SKIA_DIR
- -DHarfBuzz_LIBRARIES=/app/lib/libharfbuzz.a # - -DHarfBuzz_LIBRARIES=/app/lib/libharfbuzz.a # Handled by FindSkia.cmake
- -DHarfBuzz_LIBRARY=/app/lib/libharfbuzz.a # - -DHarfBuzz_LIBRARY=/app/lib/libharfbuzz.a # Handled by FindSkia.cmake
build-commands: build-commands:
# Standard ninja build # Standard ninja build
- ninja - ninja
@ -276,7 +275,7 @@ modules:
- | - |
echo "Verifying required libraries..." echo "Verifying required libraries..."
if [ ! -f /app/lib/libskia.a ]; then echo "ERROR: libskia.a missing"; exit 1; fi if [ ! -f /app/lib/libskia.a ]; then echo "ERROR: libskia.a missing"; exit 1; fi
if [ ! -f /app/lib/libfreetype.a ]; then echo "ERROR: libfreetype.a missing"; exit 1; fi if [ ! -f /app/lib/libfreetype2.a ]; then echo "ERROR: libfreetype2.a missing"; exit 1; fi
if [ ! -f /app/lib/libharfbuzz.a ]; then echo "ERROR: libharfbuzz.a missing"; exit 1; fi if [ ! -f /app/lib/libharfbuzz.a ]; then echo "ERROR: libharfbuzz.a missing"; exit 1; fi
echo "All required libraries present." echo "All required libraries present."
@ -286,6 +285,8 @@ modules:
# Use the directory copied into the Docker image # Use the directory copied into the Docker image
- type: dir - type: dir
path: /sources/aseprite path: /sources/aseprite
- type: patch
path: skia-deps.patch
# Install desktop file and icon after build/install # Install desktop file and icon after build/install
post-install: post-install:
# Install files from the source directory (/sources/aseprite) # Install files from the source directory (/sources/aseprite)

17
skia-deps.patch Normal file
View File

@ -0,0 +1,17 @@
--- a/laf/cmake/FindSkia.cmake
+++ b/laf/cmake/FindSkia.cmake
@@ -143,7 +143,10 @@
${SKIA_DIR}
${FREETYPE_INCLUDE_DIRS}
${HARFBUZZ_INCLUDE_DIRS}
- ${PNG_INCLUDE_DIRS})
-target_link_libraries(skia INTERFACE ${SKIA_LIBRARIES})
+ ${PNG_INCLUDE_DIRS}
+ )
+target_link_libraries(skia INTERFACE
+ ${SKIA_LIBRARIES}
+ ${FREETYPE_LIBRARIES}
+ ${HARFBUZZ_LIBRARIES})
target_compile_definitions(skia INTERFACE
SK_INTERNAL
SK_GAMMA_SRGB