Skip to content

Commit

Permalink
build(jni): more neat way to find headers
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck committed Nov 13, 2023
1 parent db1581f commit 769d2d8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
9 changes: 2 additions & 7 deletions app/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ set(CMAKE_CXX_STANDARD 14)

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

set(CMAKE_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/librime/include")

# general options
option(BUILD_SHARED_LIBS "" OFF)
option(BUILD_TESTING "" OFF)
Expand Down Expand Up @@ -53,17 +55,10 @@ option(LEVELDB_INSTALL "" OFF)
add_subdirectory(librime/deps/leveldb)

add_subdirectory(OpenCC)
include(OpenccWorkarounds)

include(RimePlugins)

option(BUILD_TEST "" OFF)
include_directories(
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/librime/include"
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/librime/deps/glog"
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/librime/deps/glog/src"
)

add_subdirectory(librime)

add_subdirectory(librime_jni)
1 change: 1 addition & 0 deletions app/src/main/jni/cmake/FindGlog.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
set(Glog_FOUND TRUE)
set(Glog_LIBRARY glog)
set(Glog_INCLUDE_PATH "${CMAKE_BINARY_DIR}/librime/deps/glog" "${CMAKE_SOURCE_DIR}/librime/deps/glog/src")
2 changes: 1 addition & 1 deletion app/src/main/jni/cmake/FindOpencc.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set(Opencc_FOUND TRUE)
set(Opencc_LIBRARY libopencc)
set(Opencc_INCLUDE_PATH "${CMAKE_BINARY_DIR}/include")
set(Opencc_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/OpenCC/src" "${CMAKE_BINARY_DIR}/OpenCC/src")
10 changes: 0 additions & 10 deletions app/src/main/jni/cmake/OpenccWorkarounds.cmake

This file was deleted.

0 comments on commit 769d2d8

Please sign in to comment.