add zstd lib

This commit is contained in:
yihaoDeng 2024-03-14 12:19:12 +00:00
parent 82488ca6c2
commit 739e3ba7ab
4 changed files with 15 additions and 4 deletions

View File

@ -4,8 +4,10 @@ ExternalProject_Add(zstd
GIT_REPOSITORY https://github.com/facebook/zstd.git
GIT_TAG v1.5.5
SOURCE_DIR "${TD_CONTRIB_DIR}/zstd"
DOWNLOAD_DIR "${TD_CONTRIB_DIR}/deps-download"
BINARY_DIR ""
CONFIGURE_COMMAND ""
CMAKE_COMMAND
CMAKE_ARGS ${TD_CONTRIB_DIR}/zstd/build/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${CMAKE_BINARY_DIR}/build/lib
BUILD_COMMAND make -j4
INSTALL_COMMAND ""
TEST_COMMAND ""

View File

@ -110,7 +110,6 @@ cat("${TD_SUPPORT_DIR}/zlib_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
cat("${TD_SUPPORT_DIR}/cjson_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
# zstd
cat("${TD_SUPPORT_DIR}/zstd_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
if (${BUILD_CONTRIB})
if(${BUILD_WITH_ROCKSDB})
@ -130,6 +129,7 @@ else()
endif()
endif()
cat("${TD_SUPPORT_DIR}/zstd_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
#libuv
if(${BUILD_WITH_UV})
cat("${TD_SUPPORT_DIR}/libuv_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
@ -430,6 +430,9 @@ if(${BUILD_PTHREAD})
target_link_libraries(pthread INTERFACE libpthreadVC3)
endif()
#target_link_libraries(zstd)
#target_include_directories()
# jemalloc
if(${JEMALLOC_ENABLED})
include(ExternalProject)

View File

@ -25,6 +25,6 @@ IF (TD_LINUX_64 AND JEMALLOC_ENABLED)
ADD_DEPENDENCIES(taosd jemalloc)
target_link_libraries(taosd dnode ${LINK_JEMALLOC})
ELSE ()
target_link_libraries(taosd dnode)
target_link_libraries(taosd dnode zstd)
ENDIF ()

View File

@ -144,6 +144,11 @@ else()
endif()
endif()
target_link_directories(
vnode
PUBLIC "${CMAKE_BINARY_DIR}/build/lib"
)
target_link_libraries(
vnode
PUBLIC os
@ -160,6 +165,7 @@ target_link_libraries(
# PUBLIC bdb
# PUBLIC scalar
PUBLIC zstd
PUBLIC rocksdb
PUBLIC transport
PUBLIC stream