#!/bin/bash
#
export PKG_CONFIG_PATH=$MINGW/lib/pkgconfig
export PKG_CONFIG_LIBDIR=$MINGW/lib/pkgconfig
export PATH=$MINGW/bin:$PATH
pkg-config --list-all
#export DEBUG="-DVERBOSE=1   -DCMAKE_BUILD_TYPE=Debug -G \"CodeBlocks - Unix Makefiles\"   "
export DEBUG="-G \"Unix Makefiles\""
echo "<<<<<<<<<<<<Cross compiling core>>>>>>>>>>>>>>>"
cmake   -DCROSS=$MINGW \
	-DTOOLCHAIN_LOCATION=$TOOLCHAIN_LOCATION  \
        -DCMAKE_INSTALL_PREFIX=$MINGW/Release \
        -DQT_HOME:STRING=$QT_HOME \
	-DCMAKE_CROSS_PREFIX=$CROSS_PREFIX \
	-DCMAKE_RC_COMPILER:STRING=$MINGW/bin/$CROSS_PREFIX-windres \
        -DCMAKE_C_COMPILER:STRING=$CROSS_PREFIX-${CROSS_C_COMPILER} \
        -DCMAKE_CXX_COMPILER:STRING=$CROSS_PREFIX-${CROSS_CXX_COMPILER} \
        -DCMAKE_LINKER:STRING=$CROSS_PREFIX-ld \
        -DCMAKE_AR:STRING=$CROSS_PREFIX-ar \
        -DCMAKE_SYSTEM_NAME:STRING=Windows \
        -DAVIDEMUX_TOP_SOURCE_DIR="$TOP"  \
        -G "Unix Makefiles" \
        $TOP/avidemux/qt4
