From 4e98a89b9d5c9b1ff82c9648bdb67f66d5a25b1f Mon Sep 17 00:00:00 2001 From: Guillaume Jacquemin Date: Mon, 28 Aug 2023 13:14:00 +0200 Subject: [PATCH] CMakeLists: add a better way to force static zlib. This requires a minimum CMake version bump, but most systems should have access to 3.24 by now, as it was released last year. --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f06cac..59945a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,14 +14,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.24) project(MassBuilderSaveTool) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules/" ${CMAKE_MODULE_PATH}) -if(MINGW) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) # This _shouldn't_ be needed, but, anything's possible... -endif() +set(ZLIB_USE_STATIC_LIBS ON CACHE BOOL "" FORCE) # Required on setups where zlib is available as both dynamic and static libs. Which is pretty much everywhere, actually. option(SAVETOOL_USE_SYSTEM_LIBS "Use system-wide versions of the dependencies instead of the versions provided by submodules." OFF)