vcpkg/ports/opencc/fix-dependencies.patch
2023-02-23 11:11:11 -08:00

27 lines
687 B
Diff

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c0a0b10..19f7cbb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -137,6 +137,21 @@ set_target_properties(
${OPENCC_VERSION_MAJOR}.${OPENCC_VERSION_MINOR}
)
+if(USE_SYSTEM_RAPIDJSON)
+ find_package(RapidJSON CONFIG REQUIRED)
+ target_link_libraries(libopencc rapidjson)
+endif()
+
+if(USE_SYSTEM_TCLAP)
+ find_path(TCLAP_INCLUDE_DIRS "tclap/Arg.h")
+ target_include_directories(libopencc PUBLIC ${TCLAP_INCLUDE_DIRS})
+endif()
+
+if(USE_SYSTEM_DARTS)
+ find_path(DARTS_INCLUDE_DIRS "darts.h")
+ target_include_directories(libopencc PUBLIC ${DARTS_INCLUDE_DIRS})
+endif()
+
# Installation
install(