You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
minizip/minizip-2.10.2-BRG_FORCE_FE...

43 lines
1.5 KiB

From 861ba9e9fe82403805119fb3879f77d2d80be1fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= <panovotn@redhat.com>
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,8 +31,9 @@ option(MZ_FILE32_API "Builds using posix 32-bit file api" OFF)
set(MZ_PROJECT_SUFFIX "" CACHE STRING "Project name suffix for package managers")
option(ZLIB_FORCE_FETCH "Skips find package for ZLIB" OFF)
option(ZSTD_FORCE_FETCH "Skips find package for ZSTD" OFF)
+option(BRG_FORCE_FETCH "Clone Brian Gladman's encryption library from GIT" ON)
-mark_as_advanced(MZ_FILE32_API MZ_PROJECT_SUFFIX ZLIB_FORCE_FETCH ZSTD_FORCE_FETCH)
+mark_as_advanced(MZ_FILE32_API MZ_PROJECT_SUFFIX ZLIB_FORCE_FETCH ZSTD_FORCE_FETCH BRG_FORCE_FETCH)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 OLD)
@@ -489,8 +490,10 @@ endif()
# Include Brian Gladman's crypto library
if(MZ_BRG)
- 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