mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 18:17:51 +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 "v${VERSION}"
|
|
SHA512 6162e05a172abc1445857999907701ed829e850d4d06677907d4cff7372304e442e6037fb1700cdbde5ecda1da5bec63145717db163c0154830b28dc339ef9d4
|
|
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=tvg
|
|
-Dvector=true # This assumes AVX
|
|
-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")
|