mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
49 lines
1.3 KiB
CMake
49 lines
1.3 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO thorvg/thorvg
|
|
REF v0.11.0
|
|
SHA512 abca41b95152d30fc20fd51383447958347e19b123c798b321bcc3ab6850c4f70edd1cd89dc60fdce866afa3f8ffe50a913cdfb4ffbf2d3c1384937cf80183d8
|
|
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)
|
|
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) |