2018-06-13 20:12:52 +02:00
|
|
|
#!/usr/bin/env sh
|
2016-07-19 05:27:51 +02:00
|
|
|
|
|
|
|
# Always pass the CMAKE_TOOLCHAIN_FILE variable to CMake when inside a
|
|
|
|
# dockcross environment -- the CMAKE_TOOLCHAIN_FILE environmental variable is
|
|
|
|
# always set in this context
|
2016-09-22 03:11:33 +02:00
|
|
|
|
|
|
|
# Exception:
|
|
|
|
#
|
|
|
|
# Do not pass the toolchain when calling CMake with these options:
|
|
|
|
# -E = CMake command mode.
|
|
|
|
# --build <dir> = Build a CMake-generated project binary tree.
|
|
|
|
# --find-package = Run in pkg-config like mode.
|
2022-09-25 12:04:17 +02:00
|
|
|
# --install = install an already-generated project
|
2016-09-22 01:06:51 +02:00
|
|
|
#
|
2016-09-22 03:11:33 +02:00
|
|
|
case $1 in
|
|
|
|
|
2022-09-25 12:04:17 +02:00
|
|
|
-E|--build|--find-package|--install)
|
2016-09-22 03:11:33 +02:00
|
|
|
exec /usr/bin/cmake "$@"
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
exec /usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE} "$@"
|