mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[opencc] De-vendor marisa (#29997)
* Add feature marisa * update * remove useless code * add pkgconf * update
This commit is contained in:
parent
28e440beea
commit
ac4f80ae9d
@ -1,7 +1,41 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ee08591..c8c6b61 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -185,12 +185,14 @@ if(NOT USE_SYSTEM_MARISA)
|
||||
message(STATUS "Use bundled marisa library.")
|
||||
add_subdirectory(deps/marisa-0.2.6)
|
||||
else()
|
||||
- find_library(LIBMARISA NAMES marisa)
|
||||
- if (LIBMARISA)
|
||||
- message(STATUS "libmarisa found: ${LIBMARISA}")
|
||||
- else()
|
||||
- message(FATAL_ERROR "libmarisa not found.")
|
||||
- endif()
|
||||
+ find_package(PkgConfig REQUIRED)
|
||||
+ pkg_check_modules(marisa REQUIRED IMPORTED_TARGET marisa)
|
||||
+ # find_library(LIBMARISA NAMES marisa)
|
||||
+ # if (LIBMARISA)
|
||||
+ # message(STATUS "libmarisa found: ${LIBMARISA}")
|
||||
+ # else()
|
||||
+ # message(FATAL_ERROR "libmarisa not found.")
|
||||
+ # endif()
|
||||
endif()
|
||||
|
||||
######## Subdirectories
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index c0a0b10..19f7cbb 100644
|
||||
index c0a0b10..91b4037 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -114,7 +114,7 @@ configure_file(
|
||||
add_library(libopencc ${LIBOPENCC_SOURCES} ${LIBOPENCC_HEADERS})
|
||||
set_target_properties(libopencc PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
source_group(libopencc FILES ${LIBOPENCC_SOURCES} ${LIBOPENCC_HEADERS})
|
||||
-target_link_libraries(libopencc marisa)
|
||||
+target_link_libraries(libopencc PkgConfig::marisa)
|
||||
|
||||
GENERATE_EXPORT_HEADER(
|
||||
libopencc
|
||||
@@ -137,6 +137,21 @@ set_target_properties(
|
||||
${OPENCC_VERSION_MAJOR}.${OPENCC_VERSION_MINOR}
|
||||
)
|
||||
|
@ -20,6 +20,8 @@ vcpkg_cmake_configure(
|
||||
-DUSE_SYSTEM_RAPIDJSON=ON
|
||||
-DUSE_SYSTEM_TCLAP=ON
|
||||
-DUSE_SYSTEM_DARTS=ON
|
||||
-DUSE_SYSTEM_MARISA=ON
|
||||
-DPKG_CONFIG_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf
|
||||
)
|
||||
|
||||
vcpkg_cmake_install(
|
||||
|
@ -1,12 +1,18 @@
|
||||
{
|
||||
"name": "opencc",
|
||||
"version": "1.1.6",
|
||||
"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": [
|
||||
"darts-clone",
|
||||
"marisa-trie",
|
||||
{
|
||||
"name": "pkgconf",
|
||||
"host": true
|
||||
},
|
||||
"rapidjson",
|
||||
"tclap",
|
||||
{
|
||||
|
@ -5686,7 +5686,7 @@
|
||||
},
|
||||
"opencc": {
|
||||
"baseline": "1.1.6",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"opencensus-cpp": {
|
||||
"baseline": "2021-08-26",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "85a9b30209f5cd7460d2be2c8e1cc206fab66aaa",
|
||||
"version": "1.1.6",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "246c0e831df06a5235e750d5af71b7cd9b2cc904",
|
||||
"version": "1.1.6",
|
||||
|
Loading…
x
Reference in New Issue
Block a user