From 23f82c205775794fd11e4ae1ef8ead57338863b8 Mon Sep 17 00:00:00 2001 From: Nikos Chantziaras Date: Tue, 23 Nov 2021 17:14:40 +0200 Subject: [PATCH] Fix cmake wrapper breaking cmake build options Since cmake 3.20, "-D" prevents any build options (--build, --target, -j, etc) from working. It will abort with an "unrecognized argument" error. Fix the issue by passing the toolchain file as an env variable to cmake, not with -D. --- tools/osxcross-cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/osxcross-cmake b/tools/osxcross-cmake index c9a3fdd..16647dc 100755 --- a/tools/osxcross-cmake +++ b/tools/osxcross-cmake @@ -12,5 +12,6 @@ fi eval "`$dir/$host-osxcross-conf`" export OSXCROSS_HOST="$host" +export CMAKE_TOOLCHAIN_FILE="$OSXCROSS_TARGET_DIR"/toolchain.cmake -exec cmake -DCMAKE_TOOLCHAIN_FILE="$OSXCROSS_TARGET_DIR"/toolchain.cmake "$@" +exec cmake "$@"