forked from JJJollyjim/leveldb-mcpe
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated from extremeheat/leveldb-mcpe
- Loading branch information
1 parent
a30386a
commit 751094f
Showing
5 changed files
with
94 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
project(leveldb) | ||
cmake_minimum_required(VERSION 3.2) | ||
|
||
include(CheckCXXCompilerFlag) | ||
|
||
list(APPEND SOURCES db/builder.cc) | ||
list(APPEND SOURCES db/c.cc) | ||
list(APPEND SOURCES db/db_impl.cc) | ||
list(APPEND SOURCES db/db_iter.cc) | ||
list(APPEND SOURCES db/dbformat.cc) | ||
list(APPEND SOURCES db/filename.cc) | ||
list(APPEND SOURCES db/log_reader.cc) | ||
list(APPEND SOURCES db/log_writer.cc) | ||
list(APPEND SOURCES db/memtable.cc) | ||
list(APPEND SOURCES db/repair.cc) | ||
list(APPEND SOURCES db/table_cache.cc) | ||
list(APPEND SOURCES db/version_edit.cc) | ||
list(APPEND SOURCES db/version_set.cc) | ||
list(APPEND SOURCES db/write_batch.cc) | ||
list(APPEND SOURCES table/block.cc) | ||
list(APPEND SOURCES table/block_builder.cc) | ||
list(APPEND SOURCES table/filter_block.cc) | ||
list(APPEND SOURCES table/format.cc) | ||
list(APPEND SOURCES table/iterator.cc) | ||
list(APPEND SOURCES table/merger.cc) | ||
list(APPEND SOURCES table/table.cc) | ||
list(APPEND SOURCES table/table_builder.cc) | ||
list(APPEND SOURCES table/two_level_iterator.cc) | ||
list(APPEND SOURCES util/arena.cc) | ||
list(APPEND SOURCES util/bloom.cc) | ||
list(APPEND SOURCES util/cache.cc) | ||
list(APPEND SOURCES util/coding.cc) | ||
list(APPEND SOURCES util/comparator.cc) | ||
list(APPEND SOURCES util/crc32c.cc) | ||
list(APPEND SOURCES util/env.cc) | ||
list(APPEND SOURCES util/filter_policy.cc) | ||
list(APPEND SOURCES util/hash.cc) | ||
list(APPEND SOURCES util/histogram.cc) | ||
list(APPEND SOURCES util/logging.cc) | ||
list(APPEND SOURCES util/options.cc) | ||
list(APPEND SOURCES util/status.cc) | ||
list(APPEND SOURCES db/zlib_compressor.cc) | ||
list(APPEND SOURCES db/zstd_compressor.cc) | ||
list(APPEND SOURCES port/port_posix_sse.cc) | ||
include_directories(. include) | ||
|
||
if (UNIX) | ||
list(APPEND SOURCES port/port_posix.cc) | ||
list(APPEND SOURCES util/env_posix.cc) | ||
|
||
add_definitions(-DLEVELDB_PLATFORM_POSIX "-DDLLX=") | ||
if(APPLE) | ||
add_definitions(-DOS_MACOSX) | ||
endif() | ||
|
||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) | ||
|
||
if(COMPILER_SUPPORTS_CXX11) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
else() | ||
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") | ||
endif() | ||
|
||
elseif (WIN32) | ||
list(APPEND SOURCES port/port_win.cc) | ||
list(APPEND SOURCES util/env_win.cc) | ||
list(APPEND SOURCES util/win_logger.cc) | ||
add_definitions(-DLEVELDB_PLATFORM_WINDOWS "-DDLLX=__declspec(dllexport)") | ||
endif() | ||
|
||
add_library(leveldb ${SOURCES}) | ||
|
||
find_package(ZLIB REQUIRED) | ||
if (ZLIB_FOUND) | ||
include_directories( ${ZLIB_INCLUDE_DIRS} ) | ||
target_link_libraries( leveldb ${ZLIB_LIBRARIES} ) | ||
endif(ZLIB_FOUND) |
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
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