Closed hiroshiyui closed 1 month ago
Currently, the cmake_minimum_required(VERSION 3.24.0)
in libchewing is higher than cmake_minimum_required(VERSION 3.22.1)
in Guileless Bopomofo. This stops the way to improve 'Don\'t Repeat Yourself' issue.
Also, the include()
directive doesn't work well if I just do include another CMakeLists.txt directly, because they are different project()
by design.
Perhaps the better policy is keeping the existent CMakeLists.txt as is, then add several Gradle tasks to utilize system-side CMake like what prepareChewing()
do.
REMINDER:
cmake --preset c99-release -DBUILD_SHARED_LIBS=OFF .
will make make
to build static linked library (libchewing.a
).
REMINDER:
CMakeLists.txt in Android NDK behaves like a build script (runs by Ninja implicitly), while in libchewing, is like a preprocessor/generator for build systems such as Make.
Mmm...
cmake_minimum_required()
to VERSION 3.22.1 works, the building process is finished without any error.execute_process()
will run without any CMake based environment variable (CFLAGS...), which is useless for me.It's a good lesson for me that learned "these ways are NO-WAY".
Done at https://github.com/hiroshiyui/libchewingAndroidAppModule
REMINDER: Initialization of Guileless Bopomofo needs data files, being copied from new location.
Done at 0a6b42e627001f79a4de4370a06d1e8e93171257
Is your feature request related to a problem? Please describe.
Since libchewing is doing new Rust implementation, keep compatibility is a top level issue.
Describe the solution you'd like
I have to rewrite the existent CMakeLists.txt (the one in Guileless Bopomofo) in order to build chewing-jni share library correctly.
Describe alternatives you've considered
No, it's a MUST-DO TASK.