From 3fb52e3fe4370fed556c5d537d518c1cff36ab53 Mon Sep 17 00:00:00 2001 From: acaruso-xx <acaruso@tuta.io> Date: Wed, 10 Apr 2024 16:16:42 -0400 Subject: [PATCH] [Loader] Enable 'MZ_FORCE_FETCH_LIBS' I think CMake is trying to link zlib from the host system? This prevents it from doing that. This also causes a fun new CMake warning when configuring for whatever reason. --- loader/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 41cc8351..39d2d7cc 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -17,6 +17,12 @@ else() set(PROJECT_VERSION_SUFFIX "") endif() +# I think CMake is trying to link zlib from the host system? +# This prevents it from doing that. +if (CMAKE_CROSSCOMPILING) + set(MZ_FORCE_FETCH_LIBS ON) +endif() + # https://stackoverflow.com/a/63924044/9124836 # https://stackoverflow.com/a/72396471 execute_process(