#!/usr/bin/env bash

##
# regenerate Xcode environment
##
if [   -e src/actions.cpp -o -e ../src/actions.cpp ]; then
	if [ ! -e build ]; then mkdir build ; cd build ; fi
	if [   -e ../src/actions.cpp ]; then
		rm -rf CMakeCache.txt
        echo cmake .. -G Xcode -DEXIV2_ENABLE_NLS=OFF -DCMAKE_BUILD_TYPE=Debug "$@"
             cmake .. -G Xcode -DEXIV2_ENABLE_NLS=OFF -DCMAKE_BUILD_TYPE=Debug "$@"
    fi
    if [ ! -e generate ]; then
    	ln -s ../contrib/cmake/macosx/generate generate
    fi
else
	echo "*** you must be in exiv2dir or exiv2dir/build ***" >2
fi

# That's all Folks!
##
