vcpkg/ports/thorvg/portfile.cmake
rinechran 8cd577a20a
[Thorvg] Update Thorvg port to v0.13.0 (#38070)
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md)
- [x] SHA512s are updated for each updated download
- [x] The "supports" clause reflects platforms that may be fixed by this
new version
- [x] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
2024-04-10 13:03:55 -04:00

49 lines
1.4 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO thorvg/thorvg
REF "v${VERSION}"
SHA512 256a1d717d088af458729c2eb1a11c47b845206247fb1b93d783c8418fcb3843391e7d821ec97189c72c0d15d2e572156c307996c76fa4ac3444899e4283e192
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
-Dvector=false # The reason for setting 'Dvector=false' was that the creator said a false setting was necessary
-Dbindings=capi
-Dtests=false
-Dexamples=false
-Dstrip=false
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")