X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/projects.git/blobdiff_plain/b24cf353360b1352e1748d23b47375c4adafa168..9b2f0a49f8779366665b0fbfdf531e48786a1f86:/tools/make/mconfigure diff --git a/tools/make/mconfigure b/tools/make/mconfigure index ec5d2a6..adea0e3 100755 --- a/tools/make/mconfigure +++ b/tools/make/mconfigure @@ -26,6 +26,14 @@ function cmake_check { fi cp debian/$paket.cmake CMakeLists.txt + + if [ -n "$cross" ] + then + # inject cross toolset + echo "set (CMAKE_MODULE_PATH $cross)" >> CMakeLists.txt + echo "include(toolset)" >> CMakeLists.txt + fi + echo "make" > debian/$paket.build chmod 755 debian/$paket.build cmake . @@ -175,18 +183,30 @@ then echo "" > debian/rules.pre if [ -e debian/setenv.sh ]; then rm debian/setenv.sh; fi - if [ -n "$ARCH" ] - then - arch_opt="-a $ARCH" - fi if [ -n "$cross" ] then if [ ${cross:0:1} != "/" ] then cross="/opt/cross/$cross" + #export $cross fi - . "$cross/setenv.sh" - cp $cross/setenv.sh debian/setenv.sh + if [ -f "$cross/setenv.sh" ] + then + . "$cross/setenv.sh" + cp $cross/setenv.sh debian/setenv.sh + fi + if [ -z "$ARCH" ] + then + # determine architecture + GNU_ARCH=${cross%-*} # assumed format: DEB_HOST_GNU_TYPE-g++version, e.g. arm-linux-gnueabihf-4.9 + GNU_ARCH=${GNU_ARCH##*/} + arch_opt="-t $GNU_ARCH" + fi + fi + + if [ -n "$ARCH" ] + then + arch_opt="-a $ARCH" fi dpkg-architecture $arch_opt >> debian/setenv.sh