0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-04 18:45:52 +00:00

17 lines
312 B
Bash

#!/bin/sh
if [ -e CMakeLists.txt ]; then
sed -i '1s|^|project(foo LANGUAGES C CXX)\n|' CMakeLists.txt
fi
for f in "$@"; do
case "${f}" in
-DCMAKE_TOOLCHAIN_FILE=* )
sed -i "${f#-DCMAKE_TOOLCHAIN_FILE=}" \
-e 's|\(set(CMAKE_SYSTEM_NAME\) "Android")|\1 "Linux")|g'
;;
esac
done
exec @CMAKE@ "$@"