aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/thorvg
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/thorvg
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/thorvg')
-rw-r--r--vcpkg/ports/thorvg/portfile.cmake49
-rw-r--r--vcpkg/ports/thorvg/usage5
-rw-r--r--vcpkg/ports/thorvg/vcpkg.json19
3 files changed, 73 insertions, 0 deletions
diff --git a/vcpkg/ports/thorvg/portfile.cmake b/vcpkg/ports/thorvg/portfile.cmake
new file mode 100644
index 0000000..d0354bc
--- /dev/null
+++ b/vcpkg/ports/thorvg/portfile.cmake
@@ -0,0 +1,49 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO thorvg/thorvg
+ REF "v${VERSION}"
+ SHA512 e2e9c09a2c43dcd366cdd76466981ef0fb3151ba0729a85e23a7a52251db94dee4f0840c215e9310fc7a4fcce985ca3f3391cddfd5db969f65d59c7eecc789d2
+ HEAD_REF master
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ list(APPEND BUILD_OPTIONS -Dstatic=true)
+else()
+ list(APPEND BUILD_OPTIONS -Dstatic=false)
+endif()
+
+if ("tools" IN_LIST FEATURES)
+ list(APPEND BUILD_OPTIONS -Dtools=all)
+endif()
+
+vcpkg_configure_meson(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${BUILD_OPTIONS}
+ # see ${SOURCE_PATH}/meson_options.txt
+ -Dengines=['sw']
+ -Dloaders=all
+ -Dsavers=all
+ -Dsimd=false # The reason for setting 'Dsimd=false' was that the creator said a false setting was necessary
+ -Dbindings=capi
+ -Dtests=false
+ -Dexamples=false
+ -Dstrip=false
+ -Dextra=['']
+ OPTIONS_DEBUG
+ -Dlog=true
+ -Dbindir=${CURRENT_PACKAGES_DIR}/debug/bin
+ OPTIONS_RELEASE
+ -Dbindir=${CURRENT_PACKAGES_DIR}/bin
+)
+vcpkg_install_meson()
+vcpkg_fixup_pkgconfig()
+
+if ("tools" IN_LIST FEATURES)
+ vcpkg_copy_tools(TOOL_NAMES svg2tvg svg2png lottie2gif AUTO_CLEAN)
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/thorvg/usage b/vcpkg/ports/thorvg/usage
new file mode 100644
index 0000000..f6354eb
--- /dev/null
+++ b/vcpkg/ports/thorvg/usage
@@ -0,0 +1,5 @@
+The package thorvg can be imported via CMake FindPkgConfig module:
+
+ find_package(PkgConfig)
+ pkg_check_modules(thorvg REQUIRED IMPORTED_TARGET thorvg)
+ target_link_libraries(main PRIVATE PkgConfig::thorvg)
diff --git a/vcpkg/ports/thorvg/vcpkg.json b/vcpkg/ports/thorvg/vcpkg.json
new file mode 100644
index 0000000..60ad955
--- /dev/null
+++ b/vcpkg/ports/thorvg/vcpkg.json
@@ -0,0 +1,19 @@
+{
+ "name": "thorvg",
+ "version": "0.15.16",
+ "description": "ThorVG is a platform-independent portable library for drawing vector-based scenes and animations",
+ "homepage": "https://www.thorvg.org",
+ "license": "MIT",
+ "supports": "!uwp",
+ "dependencies": [
+ {
+ "name": "vcpkg-tool-meson",
+ "host": true
+ }
+ ],
+ "features": {
+ "tools": {
+ "description": "Build tools"
+ }
+ }
+}