vcpkg/ports/thorvg/portfile.cmake
rinechran bd67c9cc24
[Thorvg] Update Thorvg port to v0.10.0 (#32934)
* update : thorvg version update

* update : baseline

* feat : not supoort windows

* update : thovg.json

* fix : supports

* update : port version up

* update : not support windows

* update : base line

* feat : update windows support

* update : x-add-version
2023-08-04 06:51:05 -07:00

53 lines
1.4 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO thorvg/thorvg
REF v0.10.0
SHA512 63e0df26be141eeabf0c7204a75f55c57b59f0f2514d896ee6c73c17453e9e1b606434fa93bbbebc6a2671389ecd7ec39c1099ef25c2e9459932e9cc4d8b1241
HEAD_REF master
PATCHES
install-tools.patch
windows-build-option.patch
)
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)
if(VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "This feature doesn't support Windows platform")
endif()
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=tvg
-Dvector=true
-Dbindings=capi
-Dtests=false
-Dexamples=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 AUTO_CLEAN)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)