diff --git a/CMakeLists.txt b/CMakeLists.txt index f601d92..c1bb51a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.14) PROJECT(PikiwiDB) +include(GNUInstallDirs) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type") @@ -79,7 +80,7 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Linux") SET(CMAKE_CXX_FLAGS "-stdlib=libc++ -pthread ${CMAKE_CXX_FLAGS}") set(CMAKE_THREAD_LIBS_INIT "-lpthread") ELSEIF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - SET(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++") + SET(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -lstdc++") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wl,--no-as-needed -ldl -Wno-restrict") ENDIF () ADD_DEFINITIONS(-DOS_LINUX) @@ -105,17 +106,28 @@ SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${CMAKE_CURRENT_SOURCE_DIR}/${EP_BASE_SU SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules/") SET(BUILD_SUPPORT_DIR ${PROJECT_SOURCE_DIR}/build_support) -SET(PLIB_INSTALL_DIR ${CMAKE_BINARY_DIR}/lib) +SET(CMAKE_INSTALL_LIBDIR lib) +SET(PLIB_INSTALL_DIR ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) SET(LIB_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/${LIB_SUFFIX}) SET(LIB_INCLUDE_DIR ${LIB_INSTALL_PREFIX}/include) -SET(LIB_INSTALL_DIR ${LIB_INSTALL_PREFIX}/lib) +SET(LIB_INSTALL_DIR ${LIB_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) SET(LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${EP_BASE_SUFFIX}/Source) +SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${LIB_INSTALL_DIR}) +SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${LIB_INSTALL_DIR}) +SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIB_INSTALL_DIR}) +SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIB_INSTALL_DIR}) +SET(CMAKE_INSTALL_PREFIX ${LIB_INSTALL_DIR}) +SET(LIBDIR ${CMAKE_INSTALL_LIBDIR}) +SET(FIND_LIBRARY_USE_LIB32_PATHS true) +SET(FIND_LIBRARY_USE_LIB64_PATHS true) +SET(INSTALL_LOCATION ${LIB_INSTALL_DIR}) + # make sure we use the same compiler for all dependencies SET(CMAKE_POSITION_INDEPENDENT_CODE ON) MESSAGE(STATUS "${PROJECT_NAME} staged install: ${STAGED_INSTALL_PREFIX}") -MESSAGE(STATUS "Current platform: ${OS_VERSION} ") +MESSAGE(STATUS "Current platform: ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ") CMAKE_HOST_SYSTEM_INFORMATION(RESULT CPU_CORE QUERY NUMBER_OF_LOGICAL_CORES) MESSAGE(STATUS "CPU core ${CPU_CORE}") @@ -152,22 +164,21 @@ ENDIF() SET(LIB ${LIB} CACHE INTERNAL "libs which should be linked for executable target") INCLUDE(ExternalProject) - INCLUDE(cmake/findTools.cmake) INCLUDE(cmake/openssl.cmake) +INCLUDE(cmake/gflags.cmake) INCLUDE(cmake/lz4.cmake) +INCLUDE(cmake/zlib.cmake) +INCLUDE(cmake/protobuf.cmake) INCLUDE(cmake/zstd.cmake) -INCLUDE(cmake/gflags.cmake) INCLUDE(cmake/snappy.cmake) -INCLUDE(cmake/zlib.cmake) INCLUDE(cmake/leveldb.cmake) INCLUDE(cmake/llhttp.cmake) INCLUDE(cmake/fmt.cmake) INCLUDE(cmake/spdlog.cmake) INCLUDE(cmake/gtest.cmake) -INCLUDE(cmake/rocksdb.cmake) -INCLUDE(cmake/protobuf.cmake) INCLUDE(cmake/brpc.cmake) +INCLUDE(cmake/rocksdb.cmake) INCLUDE(cmake/braft.cmake) SET(PROTO_OUTPUT_DIR "${CMAKE_BINARY_DIR}/generated_pb") diff --git a/README.md b/README.md index ebb9190..f15d23b 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,20 @@ A C++20 implementation of Redis Server, use RocksDB for persist storage.(not inc ## Requirements -* C++20 * Linux or OS X or FreeBSD -## compile +## Compile **It is recommended to use the latest version of Ubuntu or Debian for Linux systems** Execute compilation -If the machine's GCC version is less than 11, especially on CentOS6 or CentOS7, you need to upgrade the gcc version firstly. - -Execute the following commands on CentOS: +Execute the following commands on Rocky Linux: ```bash -sudo yum -y install centos-release-scl -sudo yum -y install devtoolset-11-gcc devtoolset-11-gcc-c++ -scl enable devtoolset-11 bash +sudo dnf groupinstall -y 'Development Tools' +sudo dnf install cmake g++ autoconf perl -y +git config --global http.version HTTP/1.1 ``` Execute this command to start compiling Pikiwidb: @@ -38,7 +35,7 @@ Pikiwidb is compiled by default in release mode, which does not support debuggin ./etc/script/build.sh --debug ``` -## run +## Run ```bash bin/pikiwidb etc/conf/pikiwidb.conf diff --git a/README_CN.md b/README_CN.md index 99442f5..30c4c84 100644 --- a/README_CN.md +++ b/README_CN.md @@ -6,7 +6,6 @@ C++20 实现的增强版 Redis 服务器,使用 RocksDB 作为持久化存储引 ## 环境需求 -* C++20、CMake * Linux 或 MAC OS 或 FreeBSD ## 编译 @@ -15,14 +14,12 @@ C++20 实现的增强版 Redis 服务器,使用 RocksDB 作为持久化存储引 执行编译: -如果机器的 GCC 版本低于 11,特别是在 CentOS 6.x 或 CentOS 7.x 上,你需要先升级 GCC 版本。 - -在 CentOS 上执行以下命令: +在 Rocky Linux 下执行如下的指令: ```bash -sudo yum -y install centos-release-scl -sudo yum -y install devtoolset-11-gcc devtoolset-11-gcc-c++ -scl enable devtoolset-11 bash +sudo dnf groupinstall -y 'Development Tools' +sudo dnf install cmake g++ autoconf perl -y +git config --global http.version HTTP/1.1 ``` 执行以下命令开始编译 PikiwiDB: diff --git a/cmake/braft.cmake b/cmake/braft.cmake index e490949..02d7c8d 100644 --- a/cmake/braft.cmake +++ b/cmake/braft.cmake @@ -21,12 +21,14 @@ ExternalProject_Add( # The pr on braft is not merged, so I am using my own warehouse to run the test for the time being GIT_REPOSITORY "https://github.com/pikiwidb/braft.git" GIT_TAG v1.1.2-alpha2 + URL_HASH SHA256=6afed189e97b7e6bf5864c5162fab3365b07d515fe0de4c1b0d61eff96cf772f GIT_SHALLOW true CMAKE_ARGS -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} -DCMAKE_CXX_FLAGS=${BRAFT_CXX_FLAGS} -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} -DCMAKE_LIBRARY_PATH=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DBRPC_LIB=${BRPC_LIBRARIES} -DBRPC_INCLUDE_PATH=${BRPC_INCLUDE_DIR} -DCMAKE_POSITION_INDEPENDENT_CODE=ON diff --git a/cmake/brpc.cmake b/cmake/brpc.cmake index 4343321..68db2c7 100644 --- a/cmake/brpc.cmake +++ b/cmake/brpc.cmake @@ -23,6 +23,7 @@ ExternalProject_Add( -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} -DCMAKE_CPP_FLAGS=${CMAKE_CPP_FLAGS} -DCMAKE_INSTALL_PREFIX=${BRPC_INSTALL_DIR} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_FIND_LIBRARY_SUFFIXES=${LIB_INSTALL_PREFIX} -DCMAKE_LIBRARY_PATH=${LIB_INSTALL_PREFIX} -DGFLAGS_INCLUDE_PATH=${GFLAGS_INCLUDE_DIR} diff --git a/cmake/fmt.cmake b/cmake/fmt.cmake index 8900bd6..e343686 100644 --- a/cmake/fmt.cmake +++ b/cmake/fmt.cmake @@ -19,6 +19,7 @@ ExternalProject_Add( URL_HASH SHA256=3c2e73019178ad72b0614a3124f25de454b9ca3a1afe81d5447b8d3cbdb6d322 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} -DFMT_DOC=FALSE -DFMT_TEST=FALSE diff --git a/cmake/gflags.cmake b/cmake/gflags.cmake index 0b8b75f..517d1a4 100644 --- a/cmake/gflags.cmake +++ b/cmake/gflags.cmake @@ -10,9 +10,9 @@ ELSE () ENDIF () SET(GFLAGS_ROOT ${LIB_INSTALL_PREFIX} CACHE PATH "gflags source directory." FORCE) -SET(GFLAGS_INCLUDE_DIR "${LIB_INCLUDE_DIR}" CACHE PATH "gflags include directory." FORCE) -SET(GFLAGS_LIBRARIES "${LIB_INSTALL_DIR}/${LIB_GFLAGS}" CACHE FILEPATH "gflags library." FORCE) -SET(GFLAGS_LIBRARY "${LIB_INSTALL_DIR}/${LIB_GFLAGS}" CACHE FILEPATH "gflags library." FORCE) +SET(GFLAGS_INCLUDE_DIR ${LIB_INCLUDE_DIR} CACHE PATH "gflags include directory." FORCE) +SET(GFLAGS_LIBRARIES ${LIB_INSTALL_DIR}/${LIB_GFLAGS} CACHE FILEPATH "gflags library." FORCE) +SET(GFLAGS_LIBRARY ${LIB_INSTALL_DIR}/${LIB_GFLAGS} CACHE FILEPATH "gflags library." FORCE) SET(GFLAGS_INCLUDE_PATH "${LIB_INCLUDE_DIR}/gflags" CACHE PATH "gflags include directory." FORCE) @@ -22,9 +22,9 @@ ExternalProject_Add( URL_HASH SHA256=19713a36c9f32b33df59d1c79b4958434cb005b5b47dc5400a7a4b078111d9b5 CMAKE_ARGS -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} + -DGFLAGS_BUILD_STATIC_LIBS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF - -DGFLAGS_BUILD_STATIC_LIBS=ON -DGFLAGS_BUILD_SHARED_LIBS=OFF -DGFLAGS_BUILD_gflags_LIB=ON -DGFLAGS_BUILD_gflags_nothreads_LIB=ON @@ -36,4 +36,4 @@ ExternalProject_Add( ADD_LIBRARY(gflags STATIC IMPORTED GLOBAL) SET_PROPERTY(TARGET gflags PROPERTY IMPORTED_LOCATION ${GFLAGS_LIBRARIES}) -ADD_DEPENDENCIES(gflags extern_gflags) +ADD_DEPENDENCIES(gflags extern_gflags) \ No newline at end of file diff --git a/cmake/gtest.cmake b/cmake/gtest.cmake index 9406113..ca3f39d 100644 --- a/cmake/gtest.cmake +++ b/cmake/gtest.cmake @@ -14,6 +14,7 @@ ExternalProject_Add( GIT_TAG v1.14.0 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ) diff --git a/cmake/leveldb.cmake b/cmake/leveldb.cmake index ad7001c..8f4b72c 100644 --- a/cmake/leveldb.cmake +++ b/cmake/leveldb.cmake @@ -5,7 +5,7 @@ SET(LEVELDB_INCLUDE_DIR "${LIB_INCLUDE_DIR}/leveldb" CACHE PATH "leveldb include directory." FORCE) SET(LEVELDB_LIBRARIES "${LIB_INSTALL_DIR}/libleveldb.a" CACHE FILEPATH "leveldb include directory." FORCE) -SET(LEVELDB_INSTALL_LIBDIR "${LIB_INSTALL_PREFIX}/lib") +SET(LEVELDB_INSTALL_LIBDIR "${LIB_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") ExternalProject_Add( extern_leveldb @@ -14,9 +14,10 @@ ExternalProject_Add( GIT_REPOSITORY "https://github.com/google/leveldb.git" GIT_TAG "1.23" CMAKE_ARGS - -DCMAKE_INSTALL_LIBDIR=${LEVELDB_INSTALL_LIBDIR} -DCMAKE_INSTALL_INCLUDEDIR=${LEVELDB_INCLUDE_DIR} -DCMAKE_FIND_LIBRARY_SUFFIXES=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DSnappy_INCLUDE_DIR=${Snappy_INCLUDE_DIRS} -DSnappy_LIBRARIES=${Snappy_LIBRARIES} -DCMAKE_POSITION_INDEPENDENT_CODE=ON diff --git a/cmake/llhttp.cmake b/cmake/llhttp.cmake index 7ccf428..9262352 100644 --- a/cmake/llhttp.cmake +++ b/cmake/llhttp.cmake @@ -10,10 +10,12 @@ ExternalProject_Add( extern_llhttp ${EXTERNAL_PROJECT_LOG_ARGS} URL https://github.com/nodejs/llhttp/archive/refs/tags/release/v6.0.5.tar.gz - URL_HASH MD5=7ec6829c56642cce27e3d8e06504ddca + URL_HASH SHA256=28d5bc494d379228cd7a9af32dfc518fc9e6c5ad56838cafb63e8062bee06bda CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} + BUILD_COMMAND make -j${CPU_CORE} ) ADD_DEPENDENCIES(extern_llhttp snappy gflags zlib) diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake index f24ce88..c610411 100644 --- a/cmake/lz4.cmake +++ b/cmake/lz4.cmake @@ -9,11 +9,12 @@ SET(LZ4_LIBRARIES "${LIB_INSTALL_DIR}/liblz4.a" CACHE FILEPATH "lz4 include dire ExternalProject_Add( extern_lz4 URL https://github.com/lz4/lz4/archive/refs/tags/v1.9.4.tar.gz - URL_HASH MD5=e9286adb64040071c5e23498bf753261 + URL_HASH SHA256=0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b ${EXTERNAL_PROJECT_LOG_ARGS} SOURCE_SUBDIR build/cmake CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} -DBUILD_TESTING=OFF -DBUILD_STATIC_LIBS=ON @@ -23,4 +24,4 @@ ExternalProject_Add( ADD_LIBRARY(lz4 STATIC IMPORTED GLOBAL) SET_PROPERTY(TARGET lz4 PROPERTY IMPORTED_LOCATION ${LZ4_LIBRARIES}) -ADD_DEPENDENCIES(lz4 extern_lz4) +ADD_DEPENDENCIES(lz4 extern_lz4) \ No newline at end of file diff --git a/cmake/openssl.cmake b/cmake/openssl.cmake index 60bbe99..6d88990 100644 --- a/cmake/openssl.cmake +++ b/cmake/openssl.cmake @@ -11,7 +11,6 @@ FILE(MAKE_DIRECTORY ${OPENSSL_INCLUDE_DIR}) ExternalProject_Add( OpenSSL - # SOURCE_DIR ${OPENSSL_SOURCE_DIR} URL https://github.com/openssl/openssl/archive/refs/tags/openssl-3.2.1.tar.gz URL_HASH SHA256=75cc6803ffac92625c06ea3c677fb32ef20d15a1b41ecc8dddbc6b9d6a2da84c USES_TERMINAL_DOWNLOAD TRUE @@ -19,7 +18,9 @@ ExternalProject_Add( /config --prefix=${OPENSSL_INSTALL_DIR} --openssldir=${OPENSSL_INSTALL_DIR} - --libdir=${OPENSSL_INSTALL_DIR}/lib + --libdir=${OPENSSL_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR} + -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} no-docs BUILD_COMMAND make -j${CPU_CORE} TEST_COMMAND "" diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake index 15455df..3a510cf 100644 --- a/cmake/protobuf.cmake +++ b/cmake/protobuf.cmake @@ -31,6 +31,7 @@ ExternalProject_Add( URL_HASH SHA256=14e8042b5da37652c92ef6a2759e7d2979d295f60afd7767825e3de68c856c54 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF diff --git a/cmake/rocksdb.cmake b/cmake/rocksdb.cmake index 43b4924..41c32c0 100644 --- a/cmake/rocksdb.cmake +++ b/cmake/rocksdb.cmake @@ -12,8 +12,8 @@ ExternalProject_Add( ${EXTERNAL_PROJECT_LOG_ARGS} GIT_REPOSITORY https://github.com/facebook/rocksdb.git GIT_TAG v9.4.0 - URL https://github.com/facebook/rocksdb/archive/refs/tags/v9.4.0.tar.gz - URL_HASH MD5=ce19cb3e2b6db927ef88cbf25c42097e + URL https://github.com/facebook/rocksdb/archive/refs/tags/v9.4.0.tar.gz + URL_HASH SHA256=1f829976aa24b8ba432e156f52c9e0f0bd89c46dc0cc5a9a628ea70571c1551c DOWNLOAD_NO_PROGRESS 1 DEPENDS gflags @@ -23,6 +23,7 @@ ExternalProject_Add( zstd CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} -DWITH_BENCHMARK=OFF -DWITH_BENCHMARK_TOOLS=OFF diff --git a/cmake/snappy.cmake b/cmake/snappy.cmake index 21abccd..75f5d30 100644 --- a/cmake/snappy.cmake +++ b/cmake/snappy.cmake @@ -14,6 +14,7 @@ ExternalProject_Add( GIT_TAG "1.2.1" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF diff --git a/cmake/spdlog.cmake b/cmake/spdlog.cmake index f1d6c86..05bcb5a 100644 --- a/cmake/spdlog.cmake +++ b/cmake/spdlog.cmake @@ -18,9 +18,10 @@ ExternalProject_Add( extern_spdlog ${EXTERNAL_PROJECT_LOG_ARGS} URL https://github.com/gabime/spdlog/archive/v1.12.0.zip - URL_HASH SHA256=6174BF8885287422A6C6A0312EB8A30E8D22BCFCEE7C48A6D02D1835D7769232 + URL_HASH SHA256=6174bf8885287422a6c6a0312eb8a30e8d22bcfcee7c48a6d02d1835d7769232 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DSPDLOG_BUILD_EXAMPLE=OFF -DSPDLOG_FMT_EXTERNAL=ON diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake index 8aa92d1..b82647f 100644 --- a/cmake/zlib.cmake +++ b/cmake/zlib.cmake @@ -14,8 +14,10 @@ ExternalProject_Add( GIT_TAG "v1.2.8" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_POSITION_INDEPENDENT_CODE=ON + BUILD_COMMAND make -j${CPU_CORE} ) ADD_LIBRARY(zlib STATIC IMPORTED GLOBAL) diff --git a/cmake/zstd.cmake b/cmake/zstd.cmake index 7a3b7ad..00cf965 100644 --- a/cmake/zstd.cmake +++ b/cmake/zstd.cmake @@ -8,12 +8,13 @@ SET(zstd_LIBRARIES "${LIB_INSTALL_DIR}/libzstd.a" CACHE FILEPATH "zstd include d ExternalProject_Add( extern_zstd - URL https://github.com/facebook/zstd/releases/download/v1.5.4/zstd-1.5.4.tar.gz - URL_HASH MD5=2352b1f9ccc7446641046bb3d440c3ed ${EXTERNAL_PROJECT_LOG_ARGS} + URL https://github.com/facebook/zstd/releases/download/v1.5.4/zstd-1.5.4.tar.gz + URL_HASH SHA256=0f470992aedad543126d06efab344dc5f3e171893810455787d38347343a4424 SOURCE_SUBDIR build/cmake CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIB_INSTALL_PREFIX} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} -DBUILD_TESTING=OFF -DZSTD_BUILD_STATIC=ON