Skip to content

Commit 1cb87c5

Browse files
committed
refactor(jni): tweak with include_directories ...
... to avoid to install glog headers manually
1 parent 46cc245 commit 1cb87c5

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

app/src/main/jni/CMakeLists.txt

+5-9
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ option(WITH_GFLAGS "Use gflags" OFF)
2525
option(WITH_GTEST "Use googletest" OFF)
2626
option(WITH_UNWIND "Enable libunwind support" OFF)
2727
add_subdirectory(librime/deps/glog)
28-
file(INSTALL DESTINATION "${CMAKE_BINARY_DIR}/include/glog" TYPE FILE FILES
29-
"${CMAKE_BINARY_DIR}/librime/deps/glog/glog/export.h"
30-
"${CMAKE_BINARY_DIR}/librime/deps/glog/glog/logging.h"
31-
"${CMAKE_BINARY_DIR}/librime/deps/glog/glog/raw_logging.h"
32-
"${CMAKE_BINARY_DIR}/librime/deps/glog/glog/stl_logging.h"
33-
"${CMAKE_BINARY_DIR}/librime/deps/glog/glog/vlog_is_on.h"
34-
"librime/deps/glog/src/glog/log_severity.h"
35-
)
3628

3729
option(YAML_CPP_BUILD_TOOLS "" OFF)
3830
# TODO: remove below options after librime > 1.7.3
@@ -59,7 +51,11 @@ include(OpenccWorkarounds)
5951
include(RimePlugins)
6052

6153
option(BUILD_TEST "" OFF)
62-
include_directories("librime/include") # for X11/keysym.h
54+
include_directories(
55+
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/librime/include"
56+
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/librime/deps/glog"
57+
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/librime/deps/glog/src"
58+
)
6359
# workaround for librime/tools/rime_api_console.cc
6460
# TODO: fix it in upstream
6561
string(REPLACE "-Werror=format-security" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

0 commit comments

Comments
 (0)