From dff713f33f659028bfdba4e59c0a941eae6253f7 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 19 Jul 2022 13:58:03 -0400 Subject: [PATCH] Only generate MSYS Makefiles in MSYS shell, not when cross-compiling for Windows. --- dep.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dep.mk b/dep.mk index 1d541269..0d0964cf 100644 --- a/dep.mk +++ b/dep.mk @@ -25,11 +25,13 @@ UNTAR := tar xf UNZIP := unzip -o CONFIGURE := ./configure --prefix="$(DEP_PATH)" --host=$(MACHINE) -ifdef ARCH_WIN - CMAKE := cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)" -else - CMAKE := cmake -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)" +CMAKE := cmake +# We must use the MSYS Makefile generator in an MSYS shell. +# Cross-compiling for Windows shouldn't use this. +ifdef MSYSTEM + CMAKE += -G 'MSYS Makefiles' endif +CMAKE += -DCMAKE_INSTALL_PREFIX="$(DEP_PATH)" # Some platforms try to install to lib64 CMAKE += -DCMAKE_INSTALL_LIBDIR=lib