Skip to content

Commit 76828c9

Browse files
committed
build(jni): remove unneeded boost dependencies
Also update cxx standard to 17, so librime-lua will use std::optional and not depends on boost::optional any more.
1 parent 07e702a commit 76828c9

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

app/src/main/jni/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ project(trime-lib VERSION 3.0.0)
66
add_link_options("LINKER:--hash-style=gnu,--build-id=none")
77

88
set(ANDROID_STL c++_shared)
9-
set(CMAKE_CXX_STANDARD 14)
9+
set(CMAKE_CXX_STANDARD 17)
1010

1111
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
1212

app/src/main/jni/cmake/Boost.cmake

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ endif()
2424
set(BOOST_INCLUDE_LIBRARIES
2525
algorithm
2626
crc
27-
date_time
2827
dll
2928
interprocess
3029
range
@@ -34,9 +33,6 @@ set(BOOST_INCLUDE_LIBRARIES
3433
utility
3534
uuid
3635
# librime-charcode
37-
locale
38-
asio
39-
# librime-lua
40-
optional)
36+
locale)
4137

4238
add_subdirectory(boost EXCLUDE_FROM_ALL)

app/src/main/jni/cmake/Rime.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ option(BUILD_STATIC "" ON)
2424
add_subdirectory(librime)
2525
target_compile_options(rime-static PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
2626

27-
target_link_libraries(rime-charcode-objs Boost::asio Boost::locale)
27+
target_link_libraries(rime-charcode-objs Boost::locale)
2828

29-
target_link_libraries(rime-lua-objs Boost::optional)
3029
target_compile_options(rime-lua-objs PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
3130

3231
target_compile_options(rime-octagram-objs PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")

0 commit comments

Comments
 (0)