#!/bin/bash
export PKG_CONFIG_PATH=$XSDK/lib/pkgconfig
export PKG_CONFIG_LIBDIR=$XSDK/lib/pkgconfig
export CXXFLAGS="-arch i386"
export CFLAGS="$CXXFLAGS"
export CPPFLAGS="$CXXFLAGS"
export LDFLAGS="-L$XSDK/lib"
export PATH=$PATH:$XSDK/bin:$TOOLCHAIN_DIR
pkg-config --list-all
#export DEBUG="-DVERBOSE=1 -DDEBUG=1  -DCMAKE_BUILD_TYPE=Debug    "
echo "<<<<<<<<<<<<Cross compiling core ($XSDK)>>>>>>>>>>>>>>>>"
cmake   -DCROSS=$XSDK \
	-DFAKEROOT=$DST/ \
	-DCMAKE_SYSTEM_NAME=Darwin  \
        -DCMAKE_INSTALL_PREFIX=/Release \
	-DCMAKE_CROSS_PREFIX=$CROSS_PREFIX \
        -DCMAKE_C_COMPILER:STRING=$CROSS_PREFIX-gcc \
        -DCMAKE_CXX_COMPILER:STRING=$CROSS_PREFIX-g++ \
        -DCMAKE_LINKER:STRING=$CROSS_PREFIX-ld \
        -DCMAKE_AR:STRING=$CROSS_PREFIX-ar \
        -DAVIDEMUX_TOP_SOURCE_DIR="$TOP"  \
        -G "Unix Makefiles" \
        $TOP/avidemux_core
