mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 17:39:06 +08:00
52 lines
1.5 KiB
CMake
52 lines
1.5 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO thorvg/thorvg
|
|
REF "v${VERSION}"
|
|
SHA512 428a9e09f9e0d1dffd06862331a892c79b233c022403b4b97418a769e5b0c849146f6920c3ee8733894a73c6641175daf3f92a71b61e2fad99996d1729e0f5a2
|
|
HEAD_REF master
|
|
PATCHES
|
|
revert-mutex.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=all
|
|
-Dsimd=false # The reason for setting 'Dsimd=false' was that the creator said a false setting was necessary
|
|
-Dbindings=capi
|
|
-Dtests=false
|
|
-Dexamples=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 ("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")
|