Skip to content

Commit

Permalink
build(cmake): use cmake file command to create symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck committed Dec 4, 2023
1 parent 7e9b4ef commit b2a8552
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions app/src/main/jni/cmake/Rime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@ set(RIME_PLUGINS

# symlink plugins
foreach(plugin ${RIME_PLUGINS})
execute_process(COMMAND ln -sv
"${CMAKE_SOURCE_DIR}/${plugin}"
"${CMAKE_SOURCE_DIR}/librime/plugins"
)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/librime/plugins/${plugin}")
file(CREATE_LINK
"${CMAKE_SOURCE_DIR}/${plugin}"
"${CMAKE_SOURCE_DIR}/librime/plugins/${plugin}"
COPY_ON_ERROR SYMBOLIC
)
endif()
endforeach()

# librime-lua
file(REMOVE "${CMAKE_SOURCE_DIR}/librime/plugins/librime-lua/thirdparty")
execute_process(COMMAND ln -sv
"${CMAKE_SOURCE_DIR}/librime-lua-deps"
"${CMAKE_SOURCE_DIR}/librime/plugins/librime-lua/thirdparty"
)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/librime/plugins/librime-lua/thirdparty")
file(CREATE_LINK
"${CMAKE_SOURCE_DIR}/librime-lua-deps"
"${CMAKE_SOURCE_DIR}/librime/plugins/librime-lua/thirdparty"
COPY_ON_ERROR SYMBOLIC
)
endif()

# librime-charcode
option(BUILD_WITH_ICU "" OFF)
Expand Down

0 comments on commit b2a8552

Please sign in to comment.