Skip to content

Commit 0e1b400

Browse files
author
timlinux
committed
Give mac is own little script for building
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5517 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 803b83d commit 0e1b400

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

build.mac.sh

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
#
3+
# A simple script to build QGIS
4+
# Tim Sutton 2005-2006
5+
# and Martin Dobias 2006
6+
#
7+
if [ ! $1 ]
8+
then
9+
echo "Usage: ${0} install_prefix"
10+
echo "e.g."
11+
echo "${0} \$HOME/apps/"
12+
exit 1
13+
fi
14+
15+
AUTOGEN_FLAGS=
16+
17+
# for debug build:
18+
# - disable default optimisations to improve debugging (omitting default -O2 flags)
19+
# - show warnings
20+
if [ x$2 = xdebug ]
21+
then
22+
echo "Building with debug support"
23+
AUTOGEN_FLAGS="--enable-debug"
24+
export CFLAGS="-g -Wall"
25+
export CXXFLAGS="-g -Wall"
26+
#for mac fink users
27+
export CPPFLAGS=-I/sw/include
28+
fi
29+
30+
if [ x$2 = "static" ]
31+
then
32+
echo "Building with qgis statically linked to dependencies"
33+
#this is to tell linker to statically linke
34+
#against deps like gdal etc - useful for
35+
#trying to build a distributeable binary of qgis
36+
export LDFLAGS=-static
37+
fi
38+
39+
#qt installed from source
40+
#export QTDIR=/usr/local/Trolltech/Qt-4.1.0
41+
#qt installed from debian apt
42+
#export QTDIR=/usr
43+
export QTDIR=/usr/local/Qt4.1.3
44+
export PATH=$QTDIR/bin:$PATH
45+
export LD_LIBRARY_PATH=$QTDIR/lib
46+
47+
# Note: --enable-static=no tells compiler
48+
# 'dont build static versions of qgis .o files'
49+
# This only applies to qgis interal libs and speeds
50+
# up the compilation process. See discussion on
51+
# http://logs.qgis.org/slogs/%23qgis.2006-04-15.log at 17:06:10
52+
# for additional details
53+
./autogen.sh $AUTOGEN_FLAGS --prefix=${1} \
54+
--enable-static=no \
55+
--enable-unittests \
56+
--with-qtdir=$QTDIR
57+
#--with-grass=/usr/lib/grass
58+
make && make install
59+
60+
cd tests/src
61+
./runtests.sh

0 commit comments

Comments
 (0)