# This script should be sourced from an MSYS bash environment.  Its
# purpose is to setup environment variables needed to run any standard
# cmake "MSYS Makefiles" build on a Windows platform.

source setup_mingw_msys_wine_toolchain

# Tailor these install prefixes for "MSYS Makefiles" builds to your local needs:
export INSTALL_PREFIX=$WINE_ACCOUNT_PREFIX/build_results/install-$WINEVERSION
export BUILD_PREFIX=$WINE_ACCOUNT_PREFIX/build_results/build_dir-$WINEVERSION

# End of tailored values.

export INSTALL_PREFIX_BUILDTOOLS="${INSTALL_PREFIX}_buildtools"

# Put buildtools that have been built and installed by build_packages on PATH.
PATH=${INSTALL_PREFIX_BUILDTOOLS}/bin:$PATH

# Put install directory on PATH (so that, e.g., the wxwidgets
# configuration tool will be found.
PATH=${INSTALL_PREFIX}/bin:$PATH

# Put appropriate buildtools areas on these.
CMAKE_INCLUDE_PATH=${INSTALL_PREFIX_BUILDTOOLS}/include:$CMAKE_INCLUDE_PATH
CMAKE_LIBRARY_PATH=${INSTALL_PREFIX_BUILDTOOLS}/lib:$CMAKE_LIBRARY_PATH

# Put version 3 of itcl and friends higher on CMAKE_INCLUDE_PATH then
# the above default.
CMAKE_INCLUDE_PATH=${INSTALL_PREFIX_BUILDTOOLS}/include/itcl3.4:$CMAKE_INCLUDE_PATH

# Put appropriate install areas on these.
CMAKE_INCLUDE_PATH=${INSTALL_PREFIX}/include:$CMAKE_INCLUDE_PATH
CMAKE_LIBRARY_PATH=${INSTALL_PREFIX}/lib:$CMAKE_LIBRARY_PATH

# Put install-location pkg-config directories at top of PKG_CONFIG_PATH
PKG_CONFIG_PATH=$INSTALL_PREFIX/share/pkgconfig:$INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH

# BUILD_COMMAND contains the appropriate build command for this generator.
export BUILD_COMMAND=make

# Put MSYS at the top of the PATH
PATH=$MINGW_PREFIX/msys/1.0/bin/:$PATH

# Temporary until epa_build of pango and its dependencies works on either
# MinGW or MinGW/MSYS
# N.B. put all PATH additions at the bottom so the epa_build versions prevail
# (such as pkg-config) if they are available.
PATH=$PATH:/z/home/wine/gtkplus/3.6.4/bin
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/z/home/wine/gtkplus/3.6.4/lib/pkgconfig

export GENERATOR_STRING="MSYS Makefiles"
