mirror of https://github.com/microsoft/vcpkg.git
[thorvg] create a new port (#27525)
* [thorvg] create a new port * [thorvg] update baseline * [thorvg] fix windows install * [thorvg] disable arm-uwp * [thorvg] use DEBUG/RELEASE options for bindir * Update ports/thorvg/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * [thorvg] update git-tree SHA Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
This commit is contained in:
parent
10f955dd4a
commit
ef08720ac2
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/src/bin/svg2png/meson.build b/src/bin/svg2png/meson.build
|
||||
index 8011410..40cf3f9 100644
|
||||
--- a/src/bin/svg2png/meson.build
|
||||
+++ b/src/bin/svg2png/meson.build
|
||||
@@ -3,4 +3,5 @@ svg2png_src = files('svg2png.cpp', 'lodepng.cpp')
|
||||
executable('svg2png',
|
||||
svg2png_src,
|
||||
include_directories : headers,
|
||||
- link_with : thorvg_lib)
|
||||
+ link_with : thorvg_lib,
|
||||
+ install : true, install_dir : get_option('bindir'))
|
||||
diff --git a/src/bin/svg2tvg/meson.build b/src/bin/svg2tvg/meson.build
|
||||
index 2df9fac..ffd5a20 100644
|
||||
--- a/src/bin/svg2tvg/meson.build
|
||||
+++ b/src/bin/svg2tvg/meson.build
|
||||
@@ -3,4 +3,5 @@ svg2tvg_src = files('svg2tvg.cpp')
|
||||
executable('svg2tvg',
|
||||
svg2tvg_src,
|
||||
include_directories : headers,
|
||||
- link_with : thorvg_lib)
|
||||
+ link_with : thorvg_lib,
|
||||
+ install : true, install_dir : get_option('bindir'))
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Samsung/thorvg
|
||||
REF v0.8.2
|
||||
SHA512 f59e227f776fed2e0489fe33ff64008a728adf1795c58107f17ed92caa809f6f5fd0604fde91d0c1735ea82b0b9e91da36d325e492e4a9802647469b06ebafd2
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
install-tools.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)
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "thorvg",
|
||||
"version": "0.8.2",
|
||||
"description": "ThorVG is a platform-independent portable library for drawing vector-based scenes and animations",
|
||||
"homepage": "https://www.thorvg.org",
|
||||
"license": "MIT",
|
||||
"supports": "!(arm & uwp)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-tool-meson",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build tools"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7336,6 +7336,10 @@
|
|||
"baseline": "2.0",
|
||||
"port-version": 6
|
||||
},
|
||||
"thorvg": {
|
||||
"baseline": "0.8.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"threadpool": {
|
||||
"baseline": "0.2.5",
|
||||
"port-version": 2
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "8b58170314a2c17cfe233745f8a8e6c27d3b6e38",
|
||||
"version": "0.8.2",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue