forked from osfans/trime
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(jni): try to improve the build of rime and its plugins
- Loading branch information
1 parent
1f35a8e
commit f9d3cfc
Showing
4 changed files
with
43 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
set(Boost_FOUND TRUE) | ||
|
||
list(TRANSFORM ${BOOST_INCLUDE_LIBRARIES} | ||
PREPEND Boost:: | ||
list(TRANSFORM BOOST_INCLUDE_LIBRARIES | ||
PREPEND "Boost::" | ||
OUTPUT_VARIABLE Boost_LIBRARIES | ||
) | ||
|
||
if(NOT TARGET Boost::boost) | ||
add_library(Boost::boost INTERFACE IMPORTED) | ||
foreach(lib ${Boost_LIBRARIES}) | ||
get_target_property(_include ${lib} INTERFACE_INCLUDE_DIRECTORIES) | ||
list(APPEND includes ${_include}) | ||
endforeach() | ||
set_target_properties(Boost::boost PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${includes}" | ||
) | ||
endif() | ||
|
||
# for librime-charcode | ||
set(Boost_LOCALE_LIBRARIES Boost::locale) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# if you want to add some new plugins, add them to librime_jni/rime_jni.cc too | ||
set(RIME_PLUGINS | ||
librime-lua | ||
librime-charcode | ||
librime-octagram | ||
librime-predict | ||
) | ||
|
||
# librime-lua | ||
file(REMOVE "${CMAKE_SOURCE_DIR}/librime/plugins/librime-lua/thirdparty") | ||
file(CREATE_LINK | ||
"${CMAKE_SOURCE_DIR}/librime-lua-deps" | ||
"${CMAKE_SOURCE_DIR}/librime-lua/thirdparty/librime-lua-deps" | ||
SYMBOLIC COPY_ON_ERROR | ||
) | ||
|
||
# symlink plugins | ||
foreach(plugin ${RIME_PLUGINS}) | ||
file(CREATE_LINK | ||
"${CMAKE_SOURCE_DIR}/${plugin}" | ||
"${CMAKE_SOURCE_DIR}/librime/plugins/${plugin}" | ||
SYMBOLIC COPY_ON_ERROR | ||
) | ||
endforeach() | ||
|
||
# librime-charcode | ||
option(BUILD_WITH_ICU "" OFF) | ||
|
||
option(BUILD_TEST "" OFF) | ||
option(BUILD_STATIC "" ON) | ||
add_subdirectory(librime) | ||
|
||
target_link_libraries(rime-charcode-objs | ||
Boost::asio | ||
Boost::locale | ||
) | ||
|
||
target_link_libraries(rime-lua-objs | ||
Boost::optional | ||
) |
This file was deleted.
Oops, something went wrong.