Description
The vcpkg skia package does not provide SVG support. When attempting to use Skia's SVG functionality (e.g., SkSVGDOM), linking fails with unresolved external symbols, even after linking only the core library unofficial::skia::skia. Additionally, the modular target unofficial::skia::modules::svg is not found, as reported in the CMake configuration.
I expect that either:
- The core library includes SVG support (and the symbols are exported), or
- There is a separate CMake target for the SVG module that can be linked.
Neither is currently the case.
Steps to reproduce
-
Install Skia via vcpkg:
(My vcpkg.json includes features: freetype, gl, harfbuzz, icu, jpeg, png, webp. No svg feature is available.)
-
In CMake, find the package and link the core library:
find_package(unofficial-skia CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::skia::skia)
-
Use SVG code in your project, e.g.:
auto stream = SkMemoryStream::MakeCopy(code.data(), code.size());
auto svgDom = SkSVGDOM::MakeFromStream(*stream);
-
Build the project. Linking fails with errors like:
error LNK2019: unresolved external symbol "public: static class sk_sp<class SkSVGDOM> __cdecl SkSVGDOM::MakeFromStream(class SkStream &)"
error LNK2019: unresolved external symbol "public: void __cdecl SkSVGDOM::setContainerSize(struct SkSize const &)"
error LNK2019: unresolved external symbol "public: void __cdecl SkSVGDOM::render(class SkCanvas *)const"
If I attempt to link the (non-existent) modular target:
target_link_libraries(main PRIVATE unofficial::skia::modules::svg)
CMake errors with:
Target "main" links to unofficial::skia::modules::svg but the target was not found.
Environment
- OS: Windows 11 25H2 (10.0.26200)
- Compiler: MSVC 19.40.36231 (from Visual Studio 18 2026)
- vcpkg version: (latest, as of 2026-08-11)
- Triplet:
x64-windows
- Skia package version:
skia:x64-windows@148 (installed with features: core,webp,png,jpeg,icu,harfbuzz,gl,freetype,dng)
- CMake version: 3.15+ (tested with 3.31)
Additional context
- I did not build Skia manually; I rely solely on vcpkg's prebuilt binary.
- The official Skia documentation indicates that SVG support is optional and can be enabled via the GN flag
skia_enable_svg = true. The vcpkg portfile does not currently expose this option.
- The CMake file
unofficial-skia-targets.cmake (provided by the package) does not list any target for SVG, confirming it is not built.
- I have also checked the installed
lib/ directory for any library named skia_svg or similar – none exists.
Suggestion
Please consider adding an optional feature (e.g., skia[svg]) that enables SVG support, either by:
- Building the SVG module as a separate library and exporting the corresponding CMake target (e.g.,
unofficial::skia::modules::svg), or
- Including SVG symbols directly into the core library when the feature is enabled.
Alternatively, if SVG is intentionally excluded, please document this limitation clearly in the package description.
Thank you for maintaining this package!
Description
The vcpkg
skiapackage does not provide SVG support. When attempting to use Skia's SVG functionality (e.g.,SkSVGDOM), linking fails with unresolved external symbols, even after linking only the core libraryunofficial::skia::skia. Additionally, the modular targetunofficial::skia::modules::svgis not found, as reported in the CMake configuration.I expect that either:
Neither is currently the case.
Steps to reproduce
Install Skia via vcpkg:
(My
vcpkg.jsonincludes features:freetype,gl,harfbuzz,icu,jpeg,png,webp. Nosvgfeature is available.)In CMake, find the package and link the core library:
Use SVG code in your project, e.g.:
Build the project. Linking fails with errors like:
If I attempt to link the (non-existent) modular target:
CMake errors with:
Environment
x64-windowsskia:x64-windows@148(installed with features:core,webp,png,jpeg,icu,harfbuzz,gl,freetype,dng)Additional context
skia_enable_svg = true. The vcpkg portfile does not currently expose this option.unofficial-skia-targets.cmake(provided by the package) does not list any target for SVG, confirming it is not built.lib/directory for any library namedskia_svgor similar – none exists.Suggestion
Please consider adding an optional feature (e.g.,
skia[svg]) that enables SVG support, either by:unofficial::skia::modules::svg), orAlternatively, if SVG is intentionally excluded, please document this limitation clearly in the package description.
Thank you for maintaining this package!