Meta: Add a workaround when compiling for Android

We shouldn't do any of this but it's necessary in order to link it
properly.
This commit is contained in:
Olekoop 2025-06-10 19:09:39 +02:00 committed by Andrew Kaster
commit 4b384a3593
Notes: github-actions[bot] 2025-07-10 21:46:49 +00:00

View file

@ -13,6 +13,17 @@ if(unofficial-skia_FOUND)
# FIXME: Submit a proper patch to vcpkg and skia to the SKCMS header file to set this in a cross-platform way.
set_property(TARGET unofficial::skia::skia APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS "SKCMS_API=__declspec(dllimport)")
endif()
if (ANDROID)
# FIXME: Submit a proper patch to vcpkg in order not to bring host's libc++ when compiling for Android
get_target_property(link_libs unofficial::skia::skia INTERFACE_LINK_LIBRARIES)
set(filtered_libs)
foreach(lib ${link_libs})
if (NOT lib MATCHES "lib/libc\\+\\+.so$")
list(APPEND filtered_libs ${lib})
endif()
endforeach()
set_property(TARGET unofficial::skia::skia PROPERTY INTERFACE_LINK_LIBRARIES ${filtered_libs})
endif()
else()
find_package(PkgConfig)