From 861ba9e9fe82403805119fb3879f77d2d80be1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= Date: Mon, 26 Oct 2020 16:23:03 +0100 Subject: [PATCH] Allow option to skip git clone for MZ_BRG Downloading additional sources during build is problematic for distribution integration. --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c7d45d..4f775d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,9 +31,10 @@ option(MZ_BUILD_FUZZ_TEST "Builds minizip fuzzer executables" OFF) option(MZ_CODE_COVERAGE "Builds with code coverage flags" OFF) option(MZ_FILE32_API "Builds using posix 32-bit file api" OFF) +option(BRG_FORCE_FETCH "Clone Brian Gladman's encryption library from GIT" ON) set(MZ_PROJECT_SUFFIX "" CACHE STRING "Project name suffix for package managers") -mark_as_advanced(MZ_FILE32_API MZ_PROJECT_SUFFIX) +mark_as_advanced(MZ_FILE32_API MZ_PROJECT_SUFFIX BRG_FORCE_FETCH) if(POLICY CMP0074) cmake_policy(SET CMP0074 OLD) @@ -475,8 +476,10 @@ message(FATAL_ERROR "AES and SHA libraries not found") endif() - clone_repo(aes https://github.com/BrianGladman/aes) - clone_repo(sha https://github.com/BrianGladman/sha) + if(BRG_FORCE_FETCH) + clone_repo(AES https://github.com/BrianGladman/aes) + clone_repo(SHA https://github.com/BrianGladman/sha) + endif() set(BRG_AES_SRC lib/aes/brg_endian.h 2.26.2 --- minizip-2.10.6/CMakeLists.txt 2020-12-29 22:16:01.000000000 +0100 +++ blahbleh 2021-01-12 14:07:44.050770188 +0100