--- storage/rocksdb/CMakeLists.txt.orig 2019-05-16 05:06:00 UTC +++ storage/rocksdb/CMakeLists.txt @@ -23,8 +23,8 @@ ELSE () ENDIF () # check platform support, no 32 bit -IF (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - MESSAGE (${MYROCKS_STATUS_MODE} "x86_64 is only platform supported. ${CMAKE_SYSTEM_PROCESSOR} found. Not building MyRocks") +IF (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") + MESSAGE (${MYROCKS_STATUS_MODE} "amd64 is only platform supported. ${CMAKE_SYSTEM_PROCESSOR} found. Not building MyRocks") RETURN () ENDIF () @@ -123,38 +123,6 @@ EXECUTE_PROCESS( # split the list into lines STRING(REGEX MATCHALL "[^\n]+" ROCKSDB_LIB_SOURCES ${SCRIPT_OUTPUT}) -# add bundled compression code -SET(ROCKSDB_LIB_SOURCES - ${ROCKSDB_LIB_SOURCES} - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/entropy_common.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/error_private.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/fse_decompress.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/pool.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/threading.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/xxhash.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/zstd_common.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_compress_literals.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_compress_sequences.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_double_fast.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_fast.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_lazy.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_ldm.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_opt.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/hist.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/fse_compress.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/huf_compress.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_compress.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstdmt_compress.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/decompress/huf_decompress.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/decompress/zstd_decompress.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/decompress/zstd_decompress_block.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/decompress/zstd_ddict.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/dictBuilder/cover.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/dictBuilder/fastcover.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/dictBuilder/divsufsort.c - ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/dictBuilder/zdict.c -) - INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/include @@ -198,6 +166,7 @@ SET(ROCKSDB_SOURCES ) SET(rocksdb_static_libs ${rocksdb_static_libs} ${ZLIB_LIBRARY} ${LZ4_LIBRARY} "-lrt" "-ldl") +SET(rocksdb_static_libs ${rocksdb_static_libs} ${ZLIB_LIBRARY} ${LZ4_LIBRARY} "-lrt" "-ldl -llz4 -lzstd") MYSQL_ADD_PLUGIN(rocksdb ${ROCKSDB_SOURCES} STORAGE_ENGINE DEFAULT MODULE_ONLY LINK_LIBRARIES ${rocksdb_static_libs}