From f7a6bdd1198096caf41764ba4f2b22c781f50372 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Mon, 16 Jan 2023 08:02:05 +0100 Subject: [PATCH] setupenv: Cygwin workaround: Check for CMake on Windows --- setupenv.bashrc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/setupenv.bashrc b/setupenv.bashrc index 79cbef1..96e7413 100644 --- a/setupenv.bashrc +++ b/setupenv.bashrc @@ -94,11 +94,20 @@ else MISSING_DEPS=1 fi -if command -v cmake > /dev/null 2>&1; then - true +if uname -s | tr [:upper:] [:lower:] | grep cygwin >/dev/null; then + if PATH=$(echo $PATH | sed 's/:/\n/g' | grep cygdrive | tr '\n' ':') command -v cmake > /dev/null 2>&1; then + true + else + echo "WARNING: \`cmake\` needs to be installed on Windows directly to build downloaded dependencies." + MISSING_DEPS=1 + fi else - echo "WARNING: \`cmake\` is needed to build downloaded dependencies." - MISSING_DEPS=1 + if command -v cmake > /dev/null 2>&1; then + true + else + echo "WARNING: \`cmake\` is needed to build downloaded dependencies." + MISSING_DEPS=1 + fi fi if [ -z "$CXX" ]; then