diff --git a/Meta/CMake/skia.cmake b/Meta/CMake/skia.cmake index 11b9e534150..a765ff53c04 100644 --- a/Meta/CMake/skia.cmake +++ b/Meta/CMake/skia.cmake @@ -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)