From f34c3c52bd3c441f4c8656692d7df58088491de0 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 27 Jul 2022 13:56:00 +0800 Subject: [PATCH] feat: use contrib instead of submodule for tools/taosws/taosa (#15459) --- cmake/taosadapter_CMakeLists.txt.in | 13 +++++++++++++ cmake/taostools_CMakeLists.txt.in | 13 +++++++++++++ cmake/taosws_CMakeLists.txt.in | 13 +++++++++++++ contrib/CMakeLists.txt | 18 ++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 cmake/taosadapter_CMakeLists.txt.in create mode 100644 cmake/taostools_CMakeLists.txt.in create mode 100644 cmake/taosws_CMakeLists.txt.in diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in new file mode 100644 index 0000000000..af3b5af4a6 --- /dev/null +++ b/cmake/taosadapter_CMakeLists.txt.in @@ -0,0 +1,13 @@ + +# zlib +ExternalProject_Add(taosadapter + GIT_REPOSITORY https://github.com/taosdata/taosadapter.git + GIT_TAG df8678f + SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" + BINARY_DIR "" + #BUILD_IN_SOURCE TRUE + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in new file mode 100644 index 0000000000..dfebcd2956 --- /dev/null +++ b/cmake/taostools_CMakeLists.txt.in @@ -0,0 +1,13 @@ + +# zlib +ExternalProject_Add(taos-tools + GIT_REPOSITORY https://github.com/taosdata/taos-tools.git + GIT_TAG 817cb6a + SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" + BINARY_DIR "" + #BUILD_IN_SOURCE TRUE + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) diff --git a/cmake/taosws_CMakeLists.txt.in b/cmake/taosws_CMakeLists.txt.in new file mode 100644 index 0000000000..4b7c264472 --- /dev/null +++ b/cmake/taosws_CMakeLists.txt.in @@ -0,0 +1,13 @@ + +# zlib +ExternalProject_Add(taosws-rs + GIT_REPOSITORY https://github.com/taosdata/taosws-rs.git + GIT_TAG 9de599d + SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosws-rs" + BINARY_DIR "" + #BUILD_IN_SOURCE TRUE + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index e80e7e4110..1887ba5365 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -9,6 +9,24 @@ endfunction(cat IN_FILE OUT_FILE) set(CONTRIB_TMP_FILE "${CMAKE_BINARY_DIR}/deps_tmp_CMakeLists.txt.in") configure_file("${TD_SUPPORT_DIR}/deps_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) +# taos-tools +if(${BUILD_TOOLS}) + cat("${TD_SUPPORT_DIR}/taostools_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) +endif() + +# taosws-rs +if(${WEBSOCKET}) + cat("${TD_SUPPORT_DIR}/taosws_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) +endif() + +# taosadapter +if(${BUILD_HTTP}) + MESSAGE("BUILD_HTTP is on") +else () + MESSAGE("BUILD_HTTP is off, use taosAdapter") + cat("${TD_SUPPORT_DIR}/taosadapter_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) +endif() + # pthread if(${BUILD_PTHREAD}) cat("${TD_SUPPORT_DIR}/pthread_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) -- GitLab