2022-08-13 06:46:15 +08:00
|
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
2024-10-17 18:02:21 +08:00
|
|
|
index 7768c89..70292d6 100644
|
2022-08-13 06:46:15 +08:00
|
|
|
--- a/src/CMakeLists.txt
|
|
|
|
+++ b/src/CMakeLists.txt
|
2024-10-17 18:02:21 +08:00
|
|
|
@@ -115,7 +115,7 @@ add_library(libopencc ${LIBOPENCC_SOURCES} ${LIBOPENCC_HEADERS})
|
|
|
|
add_library(OpenCC::OpenCC ALIAS libopencc)
|
2023-03-14 03:04:42 +08:00
|
|
|
set_target_properties(libopencc PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
|
|
source_group(libopencc FILES ${LIBOPENCC_SOURCES} ${LIBOPENCC_HEADERS})
|
|
|
|
-target_link_libraries(libopencc marisa)
|
2024-10-17 18:02:21 +08:00
|
|
|
+target_link_libraries(libopencc ${LIBMARISA})
|
|
|
|
target_include_directories(libopencc PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
$<INSTALL_INTERFACE:${DIR_INCLUDE}/opencc>
|
|
|
|
@@ -144,6 +144,21 @@ set_target_properties(
|
2023-02-24 03:11:11 +08:00
|
|
|
${OPENCC_VERSION_MAJOR}.${OPENCC_VERSION_MINOR}
|
2022-08-13 06:46:15 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
+if(USE_SYSTEM_RAPIDJSON)
|
|
|
|
+ find_package(RapidJSON CONFIG REQUIRED)
|
2023-02-24 03:11:11 +08:00
|
|
|
+ target_link_libraries(libopencc rapidjson)
|
2022-08-13 06:46:15 +08:00
|
|
|
+endif()
|
2022-08-27 03:11:07 +08:00
|
|
|
+
|
|
|
|
+if(USE_SYSTEM_TCLAP)
|
|
|
|
+ find_path(TCLAP_INCLUDE_DIRS "tclap/Arg.h")
|
|
|
|
+ target_include_directories(libopencc PUBLIC ${TCLAP_INCLUDE_DIRS})
|
|
|
|
+endif()
|
2022-08-30 02:33:30 +08:00
|
|
|
+
|
|
|
|
+if(USE_SYSTEM_DARTS)
|
|
|
|
+ find_path(DARTS_INCLUDE_DIRS "darts.h")
|
|
|
|
+ target_include_directories(libopencc PUBLIC ${DARTS_INCLUDE_DIRS})
|
|
|
|
+endif()
|
2022-08-13 06:46:15 +08:00
|
|
|
+
|
|
|
|
# Installation
|
|
|
|
|
2024-10-17 18:02:21 +08:00
|
|
|
if (USE_SYSTEM_MARISA)
|