diff --git a/Meta/CMake/skia.cmake b/Meta/CMake/skia.cmake index 0506d3fa77f..6b3c172d610 100644 --- a/Meta/CMake/skia.cmake +++ b/Meta/CMake/skia.cmake @@ -1,8 +1,15 @@ include_guard() +include(fontconfig) + find_package(unofficial-skia CONFIG) if(unofficial-skia_FOUND) set(SKIA_TARGET unofficial::skia::skia) + if (HAS_FONTCONFIG) + set(CMAKE_CXX_LINK_GROUP_USING_no_as_needed_SUPPORTED TRUE) + set(CMAKE_CXX_LINK_GROUP_USING_no_as_needed "LINKER:--push-state,--no-as-needed" "LINKER:--pop-state") + set_property(TARGET unofficial::skia::skia APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$") + endif() else() find_package(PkgConfig)