mirror of
https://github.com/osfans/trime.git
synced 2026-11-08 01:16:38 +08:00
feat: use librime's bundled opencc
Drop the duplicated app/src/main/jni/OpenCC submodule, and build OpenCC from librime/deps/opencc instead. The opencc already is one dependency of librime, we should use it instead of adding new submodule.
This commit is contained in:
parent
3f0eb5203b
commit
f5008260dc
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -2,9 +2,6 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
[submodule "OpenCC"]
|
||||
path = app/src/main/jni/OpenCC
|
||||
url = https://github.com/BYVoid/OpenCC.git
|
||||
[submodule "snappy"]
|
||||
path = app/src/main/jni/snappy
|
||||
url = https://github.com/google/snappy.git
|
||||
|
||||
@ -47,7 +47,7 @@ target_compile_options(
|
||||
|
||||
set(LIBMARISA marisa)
|
||||
option(USE_SYSTEM_MARISA "" ON)
|
||||
add_subdirectory(OpenCC)
|
||||
add_subdirectory(librime/deps/opencc)
|
||||
include(OpenccWorkarounds)
|
||||
|
||||
set(X11Keysym "${CMAKE_SOURCE_DIR}/librime/include")
|
||||
|
||||
@ -1 +0,0 @@
|
||||
Subproject commit 025f371dc76b598d77384fbdab90c937471844d8
|
||||
@ -4,6 +4,5 @@
|
||||
|
||||
# Since OpenCC doesn't include its headers in the binary dir, we need to install
|
||||
# them manually.
|
||||
file(GLOB LIBOPENCC_HEADERS OpenCC/src/*.hpp
|
||||
"${CMAKE_BINARY_DIR}/OpenCC/src/opencc_config.h")
|
||||
file(GLOB LIBOPENCC_HEADERS librime/deps/opencc/src/*.hpp)
|
||||
file(COPY ${LIBOPENCC_HEADERS} DESTINATION "${CMAKE_BINARY_DIR}/include/opencc")
|
||||
|
||||
@ -19,7 +19,7 @@ class NativeAppConventionPlugin : NativeBaseConventionPlugin() {
|
||||
private val Project.openccVersion: String
|
||||
get() =
|
||||
runCmd(
|
||||
"git -C app/src/main/jni/OpenCC describe --tags --long --always",
|
||||
"git -C app/src/main/jni/librime/deps/opencc describe --tags --long --always",
|
||||
)
|
||||
|
||||
override fun apply(target: Project) {
|
||||
|
||||
@ -26,7 +26,7 @@ class OpenCCDataPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
private val Project.dataBaseDir
|
||||
get() = file("src/main/jni/OpenCC/data")
|
||||
get() = file("src/main/jni/librime/deps/opencc/data")
|
||||
|
||||
private val Project.dataInstallDir
|
||||
get() = assetsDir.resolve("shared/opencc")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user