mirror of https://github.com/microsoft/vcpkg.git
49 lines
1.4 KiB
CMake
49 lines
1.4 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO thorvg/thorvg
|
|
REF "v${VERSION}"
|
|
SHA512 135c8a05f0b5b8bf90eed1779ffce39d95653cec1113a3e7a3f758a38d29761b080e04b07b0c1ab8f29632189b9f23edfe75b7931b3db8941e5c1f60e81fdc62
|
|
HEAD_REF master
|
|
)
|
|
|
|
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
|
|
-Dstatic=true # Use static modules
|
|
-Dengines=['cpu']
|
|
-Dloaders=all
|
|
-Dsavers=all
|
|
-Dsimd=true
|
|
-Dbindings=capi
|
|
-Dtests=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(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/thorvg-1/thorvg.h" "#ifndef TVG_STATIC" "#if 0")
|
|
else()
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/thorvg-1/thorvg.h" "#ifndef TVG_STATIC" "#if 1")
|
|
endif()
|
|
|
|
if ("tools" IN_LIST FEATURES)
|
|
vcpkg_copy_tools(TOOL_NAMES tvg-svg2png tvg-lottie2gif AUTO_CLEAN)
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|