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,9 +4,11 @@ ExternalProject_Add(zstd
GIT_REPOSITORY https://github.com/facebook/zstd.git GIT_REPOSITORY https://github.com/facebook/zstd.git
GIT_TAG v1.5.5 GIT_TAG v1.5.5
SOURCE_DIR "${TD_CONTRIB_DIR}/zstd" SOURCE_DIR "${TD_CONTRIB_DIR}/zstd"
DOWNLOAD_DIR "${TD_CONTRIB_DIR}/deps-download"
BINARY_DIR "" BINARY_DIR ""
CONFIGURE_COMMAND "" CMAKE_COMMAND
BUILD_COMMAND make -j4 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 "" INSTALL_COMMAND ""
TEST_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}) cat("${TD_SUPPORT_DIR}/cjson_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
# zstd # zstd
cat("${TD_SUPPORT_DIR}/zstd_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
if (${BUILD_CONTRIB}) if (${BUILD_CONTRIB})
if(${BUILD_WITH_ROCKSDB}) if(${BUILD_WITH_ROCKSDB})
@ -130,6 +129,7 @@ else()
endif() endif()
endif() endif()
cat("${TD_SUPPORT_DIR}/zstd_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
#libuv #libuv
if(${BUILD_WITH_UV}) if(${BUILD_WITH_UV})
cat("${TD_SUPPORT_DIR}/libuv_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) cat("${TD_SUPPORT_DIR}/libuv_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
@ -430,6 +430,9 @@ if(${BUILD_PTHREAD})
target_link_libraries(pthread INTERFACE libpthreadVC3) target_link_libraries(pthread INTERFACE libpthreadVC3)
endif() endif()
#target_link_libraries(zstd)
#target_include_directories()
# jemalloc # jemalloc
if(${JEMALLOC_ENABLED}) if(${JEMALLOC_ENABLED})
include(ExternalProject) include(ExternalProject)

View File

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

View File

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