Skip to content

Commit

Permalink
build(jni): remove unneeded boost dependencies
Browse files Browse the repository at this point in the history
Also update cxx standard to 17, so librime-lua will use std::optional and not depends on boost::optional any more.
  • Loading branch information
WhiredPlanck committed Mar 16, 2024
1 parent 07e702a commit 76828c9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project(trime-lib VERSION 3.0.0)
add_link_options("LINKER:--hash-style=gnu,--build-id=none")

set(ANDROID_STL c++_shared)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)

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

Expand Down
6 changes: 1 addition & 5 deletions app/src/main/jni/cmake/Boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ endif()
set(BOOST_INCLUDE_LIBRARIES
algorithm
crc
date_time
dll
interprocess
range
Expand All @@ -34,9 +33,6 @@ set(BOOST_INCLUDE_LIBRARIES
utility
uuid
# librime-charcode
locale
asio
# librime-lua
optional)
locale)

add_subdirectory(boost EXCLUDE_FROM_ALL)
3 changes: 1 addition & 2 deletions app/src/main/jni/cmake/Rime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ option(BUILD_STATIC "" ON)
add_subdirectory(librime)
target_compile_options(rime-static PRIVATE "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")

target_link_libraries(rime-charcode-objs Boost::asio Boost::locale)
target_link_libraries(rime-charcode-objs Boost::locale)

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

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

0 comments on commit 76828c9

Please sign in to comment.