Skip to content

Commit

Permalink
chore: remove leveldb from dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck committed Sep 7, 2024
1 parent d30a294 commit 2c88afe
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 61 deletions.
1 change: 0 additions & 1 deletion .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ jobs:
mingw-w64-ucrt-x86_64-glog
mingw-w64-ucrt-x86_64-gtest
mingw-w64-ucrt-x86_64-yaml-cpp
mingw-w64-ucrt-x86_64-leveldb
mingw-w64-ucrt-x86_64-rocksdb
mingw-w64-ucrt-x86_64-marisa
mingw-w64-ucrt-x86_64-opencc
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "glog"]
path = deps/glog
url = https://github.com/google/glog.git
[submodule "leveldb"]
path = deps/leveldb
url = https://github.com/google/leveldb.git
[submodule "yaml-cpp"]
path = deps/yaml-cpp
url = https://github.com/jbeder/yaml-cpp.git
Expand Down
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ endif()
set(Boost_USE_STATIC_LIBS ${BUILD_STATIC})
set(Gflags_STATIC ${BUILD_STATIC})
set(Glog_STATIC ${BUILD_STATIC})
set(LevelDb_STATIC ${BUILD_STATIC})
set(Marisa_STATIC ${BUILD_STATIC})
set(Opencc_STATIC ${BUILD_STATIC})
set(YamlCpp_STATIC ${BUILD_STATIC})
Expand Down Expand Up @@ -128,11 +127,6 @@ if(YamlCpp_STATIC)
add_definitions(-DYAML_CPP_STATIC_DEFINE)
endif()

find_package(LevelDb REQUIRED)
if(LevelDb_FOUND)
include_directories(${LevelDb_INCLUDE_PATH})
endif()

find_package(RocksDb REQUIRED)
if(RocksDb_FOUND)
include_directories(${RocksDb_INCLUDE_PATH})
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ RUN apt update && apt install -y \
libgoogle-glog-dev \
libgtest-dev \
libyaml-cpp-dev \
libleveldb-dev \
librocksdb-dev \
libmarisa-dev \
libopencc-dev \
Expand Down
1 change: 0 additions & 1 deletion action-install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dep_packages=(
libboost-locale-dev
libboost-regex-dev
libgoogle-glog-dev
libleveldb-dev
librocksdb-dev
libmarisa-dev
libyaml-cpp-dev
Expand Down
11 changes: 0 additions & 11 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ if %clean% == 1 (
rmdir /s /q %build_dir%
rmdir /s /q deps\glog\%build_dir%
rmdir /s /q deps\googletest\%build_dir%
rmdir /s /q deps\leveldb\%build_dir%
rmdir /s /q deps\rocksdb\%build_dir%
rmdir /s /q deps\marisa-trie\%build_dir%
rmdir /s /q deps\opencc\%build_dir%
Expand Down Expand Up @@ -123,16 +122,6 @@ if %build_deps% == 1 (
if errorlevel 1 goto error
popd

echo building leveldb.
pushd deps\leveldb
cmake . -B%build_dir% %deps_cmake_flags%^
-DLEVELDB_BUILD_BENCHMARKS:BOOL=OFF^
-DLEVELDB_BUILD_TESTS:BOOL=OFF
if errorlevel 1 goto error
cmake --build %build_dir% --config %build_config% --target install
if errorlevel 1 goto error
popd

echo building rocksdb.
pushd deps\rocksdb
cmake . -B%build_dir% %deps_cmake_flags%^
Expand Down
26 changes: 0 additions & 26 deletions cmake/FindLevelDb.cmake

This file was deleted.

11 changes: 1 addition & 10 deletions deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif
build ?= build
prefix ?= $(rime_root)

rime_deps = glog googletest leveldb rocksdb marisa-trie opencc yaml-cpp
rime_deps = glog googletest rocksdb marisa-trie opencc yaml-cpp

.PHONY: all clean clean-dist clean-src $(rime_deps)

Expand Down Expand Up @@ -49,15 +49,6 @@ googletest:
-DCMAKE_INSTALL_PREFIX:PATH="$(prefix)" \
&& cmake --build $(build) --target install

leveldb:
cd $(src_dir)/leveldb; \
cmake . -B$(build) \
-DLEVELDB_BUILD_BENCHMARKS:BOOL=OFF \
-DLEVELDB_BUILD_TESTS:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING="Release" \
-DCMAKE_INSTALL_PREFIX:PATH="$(prefix)" \
&& cmake --build $(build) --target install

rocksdb:
cd $(src_dir)/rocksdb; \
cmake . -B$(build) \
Expand Down
1 change: 0 additions & 1 deletion deps/leveldb
Submodule leveldb deleted from 99b3c0
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ set(rime_core_deps
${CMAKE_THREAD_LIBS_INIT}
${rime_optional_deps})
set(rime_dict_deps
${LevelDb_LIBRARY}
${RocksDb_LIBRARY}
${Marisa_LIBRARY})
set(rime_gears_deps
Expand Down

0 comments on commit 2c88afe

Please sign in to comment.