diff --git a/.gitmodules b/.gitmodules index ca546c4ef..f154f37ca 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ url = https://github.com/google/googletest.git [submodule "marisa-trie"] path = deps/marisa-trie - url = https://github.com/s-yata/marisa-trie.git + url = https://github.com/rime/marisa-trie.git [submodule "opencc"] path = deps/opencc url = https://github.com/BYVoid/OpenCC.git diff --git a/build-clang.bat b/build-clang.bat index 9e6f6f285..c54df0b3c 100644 --- a/build-clang.bat +++ b/build-clang.bat @@ -118,7 +118,7 @@ if %build_deps% == 1 ( echo building marisa. pushd deps\marisa-trie - cmake .. %deps_cmake_flags% || exit + cmake . %deps_cmake_flags% || exit cmake --build build || exit cmake --install build || exit popd diff --git a/build.bat b/build.bat index 1d0c8bbab..bf54dc674 100644 --- a/build.bat +++ b/build.bat @@ -244,7 +244,7 @@ if %build_deps% == 1 ( echo building marisa. pushd deps\marisa-trie - cmake .. -B%build_dir% %deps_cmake_flags% + cmake . -B%build_dir% %deps_cmake_flags% if errorlevel 1 goto error cmake --build %build_dir% --config %build_config% --target INSTALL if errorlevel 1 goto error diff --git a/deps.mk b/deps.mk index ac8f6e1bd..587a1557c 100644 --- a/deps.mk +++ b/deps.mk @@ -50,7 +50,7 @@ leveldb: marisa: cd $(src_dir)/marisa-trie; \ - cmake $(src_dir) -B$(build) \ + cmake . -B$(build) \ -DCMAKE_BUILD_TYPE:STRING="Release" \ -DCMAKE_INSTALL_PREFIX:PATH="$(rime_root)" \ && cmake --build $(build) --target install diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt deleted file mode 100644 index 181e2f780..000000000 --- a/deps/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -cmake_minimum_required(VERSION 3.10) -project(marisa) - -# libmarisa - -# Official repo: https://github.com/s-yata/marisa-trie -# CMake script borrowed from https://github.com/Karry/osmscout-sailfish/blob/master/CMakeLists.txt - -# libmarisa don't have cmake based build, but it is relatively small, -# so we define library target here - -if(UNIX) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Weffc++ -Wextra -Wconversion") -endif() - -set(MARISA_ROOT ${CMAKE_HOME_DIRECTORY}/marisa-trie) - -set(MARISA_INCLUDE_DIRS - ${MARISA_ROOT}/lib - ${MARISA_ROOT}/include) - -set(MARISA_SRC - ${MARISA_ROOT}/lib/marisa/grimoire/io/reader.cc - ${MARISA_ROOT}/lib/marisa/grimoire/io/mapper.cc - ${MARISA_ROOT}/lib/marisa/grimoire/io/writer.cc - ${MARISA_ROOT}/lib/marisa/grimoire/trie/tail.cc - ${MARISA_ROOT}/lib/marisa/grimoire/trie/louds-trie.cc - ${MARISA_ROOT}/lib/marisa/grimoire/vector/bit-vector.cc - ${MARISA_ROOT}/lib/marisa/trie.cc - ${MARISA_ROOT}/lib/marisa/agent.cc - ${MARISA_ROOT}/lib/marisa/keyset.cc -) - -include_directories( - ${MARISA_INCLUDE_DIRS} -) - -add_library(marisa - ${MARISA_SRC} -) - -install(TARGETS marisa - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - -set(include_headers ${MARISA_ROOT}/include/marisa.h) -file(GLOB libmarisa_include_headers ${MARISA_ROOT}/include/marisa/*.h) -install(FILES ${include_headers} DESTINATION include) -install(FILES ${libmarisa_include_headers} DESTINATION include/marisa) diff --git a/deps/marisa-trie b/deps/marisa-trie index 006020c1d..5d0014973 160000 --- a/deps/marisa-trie +++ b/deps/marisa-trie @@ -1 +1 @@ -Subproject commit 006020c1df76d0d7dc6118dacc22da64da2e35c4 +Subproject commit 5d00149732379d3d3c9540ef75b9222a1be0335e