From 7db57d1d50d66f3cb36c0e459284d1acb286202d Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 23 Sep 2021 10:43:39 +0800 Subject: [PATCH] refact --- CMakeLists.txt | 3 +++ cmake/lz4_CMakeLists.txt.in | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 cmake/lz4_CMakeLists.txt.in diff --git a/CMakeLists.txt b/CMakeLists.txt index ca6f7903a3..3cabcc5644 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,9 @@ endif(${BUILD_TEST}) ## cJson cat("${CMAKE_SUPPORT_DIR}/cjson_CMakeLists.txt.in" ${DEPS_TMP_FILE}) +## lz4 +cat("${CMAKE_SUPPORT_DIR}/lz4_CMakeLists.txt.in" ${DEPS_TMP_FILE}) + ## download dependencies configure_file(${DEPS_TMP_FILE} "${CMAKE_SOURCE_DIR}/deps/deps-download/CMakeLists.txt") execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . diff --git a/cmake/lz4_CMakeLists.txt.in b/cmake/lz4_CMakeLists.txt.in new file mode 100644 index 0000000000..dc3b17ea21 --- /dev/null +++ b/cmake/lz4_CMakeLists.txt.in @@ -0,0 +1,12 @@ + +# lz4 +ExternalProject_Add(lz4 + GIT_REPOSITORY git@github.com:lz4/lz4.git + GIT_TAG v1.9.3 + SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/lz4" + BINARY_DIR "${CMAKE_BINARY_DIR}/lz4-build" + CONFIGURE_COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}/build/cmake + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" + ) \ No newline at end of file