Allow usage of mirrors for all dependencies

This commit is contained in:
2023-10-29 19:02:11 +01:00
parent a6b31d69be
commit 45cb095561
17 changed files with 111 additions and 24 deletions

View File

@@ -2,8 +2,21 @@ cmake_minimum_required(VERSION 3.16)
project(build_libarchive)
include(ExternalProject)
if(NOT DEFINED ZLIB_REPO)
set(ZLIB_REPO https://github.com/madler/zlib.git)
endif ()
if(NOT DEFINED ZSTD_REPO)
set(ZSTD_REPO https://github.com/facebook/zstd)
endif ()
if(NOT DEFINED LZ4_REPO)
set(LZ4_REPO https://github.com/lz4/lz4)
endif ()
if(NOT DEFINED LIBARCHIVE_REPO)
set(LIBARCHIVE_REPO https://github.com/libarchive/libarchive.git)
endif ()
ExternalProject_Add(zlib
GIT_REPOSITORY https://github.com/madler/zlib.git
GIT_REPOSITORY {ZLIB_REPO}
GIT_TAG v1.2.11
GIT_SHALLOW TRUE
SOURCE_DIR zlib
@@ -17,7 +30,7 @@ ExternalProject_Add(zlib
)
ExternalProject_Add(zstd
GIT_REPOSITORY https://github.com/facebook/zstd
GIT_REPOSITORY ${ZSTD_REPO}
GIT_TAG v1.5.1
GIT_SHALLOW TRUE
SOURCE_DIR zstd
@@ -33,7 +46,7 @@ ExternalProject_Add(zstd
)
ExternalProject_Add(lz4
GIT_REPOSITORY https://github.com/lz4/lz4
GIT_REPOSITORY ${LZ4_REPO}
GIT_TAG v1.9.3
GIT_SHALLOW TRUE
SOURCE_DIR lz4
@@ -50,7 +63,7 @@ ExternalProject_Add(lz4
ExternalProject_Add(
libarchive
DEPENDS zlib zstd lz4
GIT_REPOSITORY https://github.com/libarchive/libarchive.git
GIT_REPOSITORY ${LIBARCHIVE_REPO}
GIT_TAG v3.7.0
GIT_SHALLOW TRUE
SOURCE_DIR libarchive