mirror of https://github.com/microsoft/vcpkg.git
62 lines
1.7 KiB
Diff
62 lines
1.7 KiB
Diff
diff --git a/cmake/GitVersion.cmake b/cmake/GitVersion.cmake
|
|
index f0b44a97..5d0623e6 100644
|
|
--- a/cmake/GitVersion.cmake
|
|
+++ b/cmake/GitVersion.cmake
|
|
@@ -13,7 +13,7 @@
|
|
|
|
set(_OPENCC_FALLBACK_MAJOR 1)
|
|
set(_OPENCC_FALLBACK_MINOR 4)
|
|
-set(_OPENCC_FALLBACK_REVISION 0)
|
|
+set(_OPENCC_FALLBACK_REVISION 1)
|
|
|
|
find_package(Git QUIET)
|
|
|
|
diff --git a/OpenCCConfig.cmake.in b/OpenCCConfig.cmake.in
|
|
index 7596d8d1..d747372e 100644
|
|
--- a/OpenCCConfig.cmake.in
|
|
+++ b/OpenCCConfig.cmake.in
|
|
@@ -1,5 +1,8 @@
|
|
@PACKAGE_INIT@
|
|
|
|
+include(CMakeFindDependencyMacro)
|
|
+find_dependency(RapidJSON CONFIG)
|
|
+
|
|
include(${CMAKE_CURRENT_LIST_DIR}/@OPENCC_TARGETS_EXPORT_NAME@.cmake)
|
|
|
|
set_and_check(OPENCC_INCLUDE_DIR @PACKAGE_DIR_INCLUDE@/opencc)
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index 17538302..826a30ee 100644
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -146,7 +146,7 @@ source_group(libopencc FILES
|
|
${LIBOPENCC_HEADERS}
|
|
${LIBOPENCC_PRIVATE_HEADERS}
|
|
)
|
|
-target_link_libraries(libopencc marisa)
|
|
+target_link_libraries(libopencc ${LIBMARISA})
|
|
if (NOT BUILD_SHARED_LIBS)
|
|
target_compile_definitions(libopencc PUBLIC Opencc_BUILT_AS_STATIC)
|
|
endif()
|
|
@@ -187,6 +187,21 @@ set_target_properties(
|
|
${OPENCC_ABI_VERSION}
|
|
)
|
|
|
|
+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
|
|
|
|
if (USE_SYSTEM_MARISA)
|