diff --git a/CMakeLists.txt b/CMakeLists.txt index 9533514ebc7be1ca42eabc6892e0e8a860a7dadf..e16c93c1f1394969c945aba55188c262dfb4b961 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,9 @@ endif(${BUILD_TEST}) ## lz4 cat("${CMAKE_SUPPORT_DIR}/lz4_CMakeLists.txt.in" ${DEPS_TMP_FILE}) +## zlib +cat("${CMAKE_SUPPORT_DIR}/zlib_CMakeLists.txt.in" ${DEPS_TMP_FILE}) + ## cJson cat("${CMAKE_SUPPORT_DIR}/cjson_CMakeLists.txt.in" ${DEPS_TMP_FILE}) diff --git a/cmake/cjson_CMakeLists.txt.in b/cmake/cjson_CMakeLists.txt.in index 83f34ae794f1b3cd192082a2b2080ed1e3244c8f..9995d1f8d8b79da13a70801f02fea0ce01cf48f4 100644 --- a/cmake/cjson_CMakeLists.txt.in +++ b/cmake/cjson_CMakeLists.txt.in @@ -4,7 +4,7 @@ ExternalProject_Add(cjson GIT_REPOSITORY git@github.com:taosdata-contrib/cJSON.git GIT_TAG v1.7.15 SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/cJson" - BINARY_DIR "${CMAKE_BINARY_DIR}/cJson-build" + BINARY_DIR "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" diff --git a/cmake/gtest_CMakeLists.txt.in b/cmake/gtest_CMakeLists.txt.in index 6de66e23de0c0c31967bd3972270100177b87181..655870e0c91625e2e1ec918d50ea57db096de43d 100644 --- a/cmake/gtest_CMakeLists.txt.in +++ b/cmake/gtest_CMakeLists.txt.in @@ -4,7 +4,7 @@ ExternalProject_Add(googletest GIT_REPOSITORY git@github.com:taosdata-contrib/googletest.git GIT_TAG release-1.11.0 SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/googletest" - BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build" + BINARY_DIR "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" diff --git a/cmake/lz4_CMakeLists.txt.in b/cmake/lz4_CMakeLists.txt.in index 56e5fbd25881076a59a08bfb563961c4ab58a571..5dba4f2ab18e10d3df040b0ca4cb16b716e4a416 100644 --- a/cmake/lz4_CMakeLists.txt.in +++ b/cmake/lz4_CMakeLists.txt.in @@ -4,7 +4,7 @@ ExternalProject_Add(lz4 GIT_REPOSITORY git@github.com:taosdata-contrib/lz4.git GIT_TAG v1.9.3 SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/lz4" - BINARY_DIR "${CMAKE_BINARY_DIR}/lz4-build" + BINARY_DIR "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" diff --git a/cmake/zlib_CMakeLists.txt.in b/cmake/zlib_CMakeLists.txt.in new file mode 100644 index 0000000000000000000000000000000000000000..c997fc79831d25330061679e4dce4ce89eb41745 --- /dev/null +++ b/cmake/zlib_CMakeLists.txt.in @@ -0,0 +1,13 @@ + +# zlib +ExternalProject_Add(zlib + GIT_REPOSITORY git@github.com:taosdata-contrib/zlib.git + GIT_TAG v1.2.11 + SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/zlib" + BINARY_DIR "" + #BUILD_IN_SOURCE TRUE + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) \ No newline at end of file diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 1d8eac00aae9e58ebc4a655a58c0b9e63c0f2f5e..0e08be44ac0e18a5c32864515b12b4f531d80d82 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -4,3 +4,9 @@ endif(${BUILD_TEST}) add_subdirectory(cJson) add_subdirectory(lz4/build/cmake) +add_subdirectory(zlib) +target_include_directories( + zlib + PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/zlib + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/zlib +) diff --git a/include/libs/asvc/asvc.h b/include/libs/transport/transport.h similarity index 90% rename from include/libs/asvc/asvc.h rename to include/libs/transport/transport.h index f8c697726925b77f06971faf1c01f9593c57f356..27331088250b1ede4e63c7ca0c8e24c3178fadef 100644 --- a/include/libs/asvc/asvc.h +++ b/include/libs/transport/transport.h @@ -13,8 +13,8 @@ * along with this program. If not, see . */ -#ifndef _TD_ASVC_H_ -#define _TD_ASVC_H_ +#ifndef _TD_TRANSPORT_H_ +#define _TD_TRANSPORT_H_ #ifdef __cplusplus extern "C" { @@ -24,4 +24,4 @@ extern "C" { } #endif -#endif /*_TD_ASVC_H_*/ \ No newline at end of file +#endif /*_TD_TRANSPORT_H_*/ \ No newline at end of file diff --git a/source/libs/CMakeLists.txt b/source/libs/CMakeLists.txt index c19a9da7d81d36918bbb11f4f12e3df5e21caa5f..ed6d2bef4f74d0608c106623aa5c208ccfb93f31 100644 --- a/source/libs/CMakeLists.txt +++ b/source/libs/CMakeLists.txt @@ -1,4 +1,4 @@ -add_subdirectory(asvc) +add_subdirectory(transport) add_subdirectory(raft) add_subdirectory(tkv) add_subdirectory(index) diff --git a/source/libs/asvc/CMakeLists.txt b/source/libs/asvc/CMakeLists.txt deleted file mode 100644 index 11c2e0bf59974ec5a71c0fed418acbd330714d96..0000000000000000000000000000000000000000 --- a/source/libs/asvc/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -aux_source_directory(src ASVC_SRC) -add_library(asvc ${ASVC_SRC}) -target_include_directories( - asvc - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/asvc" - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" -) \ No newline at end of file diff --git a/source/libs/transport/CMakeLists.txt b/source/libs/transport/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c01996cb8cff7e7510707af1f31d6395594b1c7b --- /dev/null +++ b/source/libs/transport/CMakeLists.txt @@ -0,0 +1,7 @@ +aux_source_directory(src TRANSPORT_SRC) +add_library(transport ${TRANSPORT_SRC}) +target_include_directories( + transport + PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/transport" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" +) \ No newline at end of file diff --git a/source/libs/asvc/inc/asvcInt.h b/source/libs/transport/inc/transportInt.h similarity index 88% rename from source/libs/asvc/inc/asvcInt.h rename to source/libs/transport/inc/transportInt.h index e32a2ea70bf931d3cef190f22b8b97fb34b957f2..24a2e0ef89fcf32bc3c1950384480dbce9c7228c 100644 --- a/source/libs/asvc/inc/asvcInt.h +++ b/source/libs/transport/inc/transportInt.h @@ -13,8 +13,8 @@ * along with this program. If not, see . */ -#ifndef _TD_ASVC_INT_H_ -#define _TD_ASVC_INT_H_ +#ifndef _TD_TRANSPORT_INT_H_ +#define _TD_TRANSPORT_INT_H_ #ifdef __cplusplus extern "C" { @@ -24,4 +24,4 @@ extern "C" { } #endif -#endif /*_TD_ASVC_INT_H_*/ \ No newline at end of file +#endif /*_TD_TRANSPORT_INT_H_*/ \ No newline at end of file diff --git a/source/libs/asvc/src/asvc.c b/source/libs/transport/src/transport.c similarity index 100% rename from source/libs/asvc/src/asvc.c rename to source/libs/transport/src/transport.c diff --git a/source/libs/asvc/test/asvcTests.cpp b/source/libs/transport/test/transportTests.cpp similarity index 100% rename from source/libs/asvc/test/asvcTests.cpp rename to source/libs/transport/test/transportTests.cpp