mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
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.
18 lines
340 B
Bash
Executable File
18 lines
340 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
dir=`dirname "$0"`
|
|
progname=`basename "$0"`
|
|
|
|
host=${progname%-cmake}
|
|
if test "$host" = "osxcross" ; then
|
|
echo "Do not invoke this script directly."
|
|
exit 1
|
|
fi
|
|
|
|
eval "`$dir/$host-osxcross-conf`"
|
|
export OSXCROSS_HOST="$host"
|
|
export CMAKE_TOOLCHAIN_FILE="$OSXCROSS_TARGET_DIR"/toolchain.cmake
|
|
|
|
exec cmake "$@"
|