[opencc] De-vendor rapidjson (#26291)

* update opencc to v1.1.4 and add feature rapidjson

* update

* convert feature to dependence

* remove useless code
This commit is contained in:
Mengna Li 2022-08-13 06:46:15 +08:00 committed by GitHub
parent 84cd59faaf
commit 4ea3456f21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,16 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 11d14e4..fde4b7b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -137,6 +137,11 @@ set_target_properties(
1.1
)
+if(USE_SYSTEM_RAPIDJSON)
+ find_package(RapidJSON CONFIG REQUIRED)
+ target_link_libraries(libopencc PRIVATE rapidjson)
+endif()
+
# Installation
install(

View File

@ -4,6 +4,8 @@ vcpkg_from_github(
REF ver.1.1.4
SHA512 ab8e7e6a0cc71106cf09eb32899fa8620b946a406f042d75a2444096e0b383cb1993d6c2d12cd7862e71854da4cd5893442bce51df84c32ed09fdfb4a2846f46
HEAD_REF master
PATCHES
fix-dependencies.patch
)
vcpkg_find_acquire_program(PYTHON3)
@ -15,6 +17,7 @@ vcpkg_cmake_configure(
OPTIONS
-DBUILD_DOCUMENTATION=OFF
-DENABLE_GTEST=OFF
-DUSE_SYSTEM_RAPIDJSON=ON
)
vcpkg_cmake_install(

View File

@ -1,11 +1,13 @@
{
"name": "opencc",
"version": "1.1.4",
"port-version": 1,
"description": "A project for conversions between Traditional Chinese, Simplified Chinese and Japanese Kanji (Shinjitai)",
"homepage": "https://github.com/BYVoid/OpenCC",
"license": "Apache-2.0",
"supports": "!(arm | uwp)",
"dependencies": [
"rapidjson",
{
"name": "vcpkg-cmake",
"host": true

View File

@ -5166,7 +5166,7 @@
},
"opencc": {
"baseline": "1.1.4",
"port-version": 0
"port-version": 1
},
"opencensus-cpp": {
"baseline": "2021-08-26",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bfa36e95a55659eb27edc3ba561b3c06b202ff76",
"version": "1.1.4",
"port-version": 1
},
{
"git-tree": "9c886059bbc8c7c14a7d7290b22e2036c3ff8fe6",
"version": "1.1.4",