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.
This commit is contained in:
Nikos Chantziaras 2021-11-23 17:14:40 +02:00
parent e59a63461d
commit 23f82c2057
No known key found for this signature in database
GPG Key ID: 15B600E72CA59238

View File

@ -12,5 +12,6 @@ fi
eval "`$dir/$host-osxcross-conf`" eval "`$dir/$host-osxcross-conf`"
export OSXCROSS_HOST="$host" 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 "$@"