-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Give mac is own little script for building
git-svn-id: http://svn.osgeo.org/qgis/trunk@5517 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
timlinux
committed
Jun 13, 2006
1 parent
314da42
commit aa68163
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/bash | ||
# | ||
# A simple script to build QGIS | ||
# Tim Sutton 2005-2006 | ||
# and Martin Dobias 2006 | ||
# | ||
if [ ! $1 ] | ||
then | ||
echo "Usage: ${0} install_prefix" | ||
echo "e.g." | ||
echo "${0} \$HOME/apps/" | ||
exit 1 | ||
fi | ||
|
||
AUTOGEN_FLAGS= | ||
|
||
# for debug build: | ||
# - disable default optimisations to improve debugging (omitting default -O2 flags) | ||
# - show warnings | ||
if [ x$2 = xdebug ] | ||
then | ||
echo "Building with debug support" | ||
AUTOGEN_FLAGS="--enable-debug" | ||
export CFLAGS="-g -Wall" | ||
export CXXFLAGS="-g -Wall" | ||
#for mac fink users | ||
export CPPFLAGS=-I/sw/include | ||
fi | ||
|
||
if [ x$2 = "static" ] | ||
then | ||
echo "Building with qgis statically linked to dependencies" | ||
#this is to tell linker to statically linke | ||
#against deps like gdal etc - useful for | ||
#trying to build a distributeable binary of qgis | ||
export LDFLAGS=-static | ||
fi | ||
|
||
#qt installed from source | ||
#export QTDIR=/usr/local/Trolltech/Qt-4.1.0 | ||
#qt installed from debian apt | ||
#export QTDIR=/usr | ||
export QTDIR=/usr/local/Qt4.1.3 | ||
export PATH=$QTDIR/bin:$PATH | ||
export LD_LIBRARY_PATH=$QTDIR/lib | ||
|
||
# Note: --enable-static=no tells compiler | ||
# 'dont build static versions of qgis .o files' | ||
# This only applies to qgis interal libs and speeds | ||
# up the compilation process. See discussion on | ||
# http://logs.qgis.org/slogs/%23qgis.2006-04-15.log at 17:06:10 | ||
# for additional details | ||
./autogen.sh $AUTOGEN_FLAGS --prefix=${1} \ | ||
--enable-static=no \ | ||
--enable-unittests \ | ||
--with-qtdir=$QTDIR | ||
#--with-grass=/usr/lib/grass | ||
make && make install | ||
|
||
cd tests/src | ||
./runtests.sh |