Skip to content

Commit b5cf5b5

Browse files
author
wonder
committedJan 16, 2010
Installation guide: updated QGIS deps (minimal sip version set to 4.8, geos to 3.0, added qwt)
Regenerated INSTALL file. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12776 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

2 files changed

+240
-219
lines changed

2 files changed

+240
-219
lines changed
 

‎INSTALL

Lines changed: 221 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,22 @@ Building QGIS from source - step by step
2525
3.10. Compilation and installation
2626
3.11. Run qgis.exe from the directory where it's installed (CMAKE_INSTALL_PREFIX)
2727
3.12. Create the installation package: (optional)
28-
4. Building on Mac OSX using frameworks and cmake (QGIS > 0.8)
29-
4.1. Install XCODE
28+
4. Building on Mac OSX using frameworks and cmake or Xcode
29+
4.1. Install Xcode
3030
4.2. Install Qt4 from .dmg
3131
4.3. Install development frameworks for QGIS dependencies
3232
4.3.1. Additional Dependencies : General compatibility note
33-
4.3.2. Additional Dependencies : GSL
34-
4.3.3. Additional Dependencies : Expat
33+
4.3.2. Additional Dependencies : Expat
34+
4.3.3. Additional Dependencies : Python
3535
4.3.4. Additional Dependencies : SIP
3636
4.3.5. Additional Dependencies : PyQt
37-
4.3.6. Additional Dependencies : Bison
38-
4.4. Install CMAKE for OSX
37+
4.3.6. Additional Dependencies : Qwt/PyQwt
38+
4.3.7. Additional Dependencies : Bison
39+
4.4. Install CMake for OSX
3940
4.5. Install subversion for OSX
4041
4.6. Check out QGIS from SVN
4142
4.7. Configure the build
42-
4.7.1. Configure the Cmake build
43+
4.7.1. Configure the CMake build
4344
4.7.2. Configure the Xcode build
4445
4.8. Building
4546
4.8.1. Building with Cmake
@@ -140,7 +141,7 @@ always welcome for indicating possible mistakes.
140141
You can download this document as part of the Quantum GIS 'User and
141142
Installation Guide' in HTML and PDF format via http://www.qgis.org. A current
142143
version is also available at the wiki, see:
143-
http://wiki.qgis.org/qgiswiki/BuildingFromSource
144+
http://www.qgis.org/wiki/Installation_Guide
144145

145146
Translations of this document can also be downloaded at the documentation area
146147
of the Quantum GIS project at http://www.qgis.org. More information is
@@ -173,33 +174,32 @@ number of major projects (eg. KDE 4.0), now uses CMake (http://www.cmake.org)
173174
for building from source. The configure script in this directory simply checks
174175
for the existence of cmake and provides some clues to build QGIS.
175176

176-
For complete information, see the wiki at:
177-
http://wiki.qgis.org/qgiswiki/Building_with_CMake
178-
179177

180178
2.1. An overview of the dependencies required for building
181179
==========================================================
182180

183181
'''Required build deps:'''
184-
* CMake >= 2.4.3
185-
* Flex, Bison
182+
* CMake >= 2.4.3
183+
* Flex, Bison
186184

187185
'''Required runtime deps:'''
188-
* Qt >= 4.3.0
189-
* Proj >= ? (known to work with 4.4.x)
190-
* GEOS >= 2.2 (3.0 is supported, maybe 2.1.x works too)
191-
* Sqlite3 >= ? (probably 3.0.0)
192-
* GDAL/OGR >= 1.4.x
186+
* Qt >= 4.3.0
187+
* Proj >= 4.4.x
188+
* GEOS >= 3.0
189+
* Sqlite3 >= 3.0.0
190+
* GDAL/OGR >= 1.4.x
193191

194192
'''Optional dependencies:'''
195-
* for GRASS plugin - GRASS >= 6.0.0
196-
* for georeferencer - GSL >= ? (works with 1.8)
197-
* for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
198-
* for gps plugin - expat >= ? (1.95 is OK)
199-
* for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
200-
* for PyQGIS - SIP >= 4.5, PyQt >= must match Qt version
193+
* for GRASS plugin - GRASS >= 6.0.0
194+
* for georeferencer - GSL >= 1.8
195+
* for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
196+
* for gps plugin - expat >= 1.95
197+
* for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
198+
* for PyQGIS - SIP >= 4.8, PyQt >= must match Qt version
199+
* for GPS tracking - Qwt >= 5.0
200+
201201
'''Recommended runtime deps:'''
202-
* for gps plugin - gpsbabel
202+
* for gps plugin - gpsbabel
203203

204204

205205
3. Building under windows using msys
@@ -236,7 +236,7 @@ document.
236236
Download qt4.3 opensource precompiled edition exe and install (including the
237237
download and install of mingw) from here:
238238

239-
http://www.trolltech.com/developer/downloads/qt/windows
239+
http://qt.nokia.com/downloads
240240

241241
When the installer will ask for MinGW, you don't need to download and install
242242
it, just point the installer to c:\msys\mingw
@@ -460,29 +460,31 @@ tree. Read the READMEfile there and follow the instructions. Next right click
460460
on qgis.nsi and choose the option 'Compile NSIS Script'.
461461

462462

463-
4. Building on Mac OSX using frameworks and cmake (QGIS > 0.8)
464-
==============================================================
463+
4. Building on Mac OSX using frameworks and cmake or Xcode
464+
==========================================================
465465

466466
In this approach I will try to avoid as much as possible building dependencies
467467
from source and rather use frameworks wherever possible.
468468

469-
Included are a few notes for building on Mac OS X 10.5 (Leopard) and 10.6
470-
(Snow Leopard).
469+
The base system here is Mac OS X 10.4 (Tiger) and below. Included are a few notes
470+
for building on Mac OS X 10.5 (Leopard) and 10.6 (Snow Leopard).
471471

472472
Snow Leopard note: A cmake/qt/sip bug currently exists where a 32-bit
473473
cmake build fails to provide python bindings. This means that python plugin support
474474
is currently lacking for 32-bit builds using cmake in Snow Leopard. See the Xcode
475475
build method to if you require python support.
476476

477477

478-
4.1. Install XCODE
478+
4.1. Install Xcode
479479
==================
480480

481-
I recommend to get the latest xcode dmg from the Apple XDC Web site. Install
482-
XCODE after the ~1gb download is complete.
481+
I recommend to get the latest Xcode dmg from the Apple XDC Web site
482+
(http:/developer.apple.com). The Mac system install disks come with a copy of
483+
Xcode, but it's likely out of date.
484+
Install Xcode after the ~1gb download is complete.
483485

484486
/!\ Note: It may be that you need to create some symlinks after installing
485-
the XCODE SDK (in particular if you are using XCODE 2.5 on tiger):
487+
Xcode (in particular if you are using Xcode 2.5 on Tiger):
486488

487489

488490
cd /Developer/SDKs/MacOSX10.4u.sdk/usr/
@@ -494,68 +496,56 @@ the XCODE SDK (in particular if you are using XCODE 2.5 on tiger):
494496
4.2. Install Qt4 from .dmg
495497
==========================
496498

497-
You need a minimum of Qt-4.3.0. I suggest getting the latest (at time of writing).
499+
You need a minimum of Qt-4.3.0. I suggest getting the latest.
498500

499501
Snow Leopard note: If you are building on Snow Leopard, you will need to
500502
decide between 32-bit support in the older, Qt Carbon branch, or 64-bit
501503
support in the Qt Cocoa branch. Appropriate installers are available for both
502-
as of Qt-4.6.0, but the beta version of Qt-4.6.0 has proven to introduce numerous
503-
bugs in Qgis. Unfortunately, the 32-bit branch of Qt currently does not build with
504-
python bindings (see notes below). You can achieve support for python in Qgis with
505-
the Xcode build method noted below.
506-
507-
508-
ftp://ftp.trolltech.com/qt/source/
504+
as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa.
509505

510506

511-
Mac versions are named as:
507+
http://qt.nokia.com/downloads
512508

513509

514-
qt-mac-opensource-x.y.z.dmg
515-
516-
517-
x, y, z being the major, minor and revision version.
518-
519-
If you want debug frameworks, Qt also provide a dmg with these. These are in
510+
If you want debug frameworks, Qt also provides a dmg with these. These are in
520511
addition to the non-debug frameworks.
521512

522513
Once downloaded open the dmg and run the installer. Note you need admin
523514
privileges to install.
524515

525-
After installing you need to make two small changes:
526-
527-
First edit /Library/Frameworks/QtCore.framework/Headers/qconfig.h and
528-
change
529-
530-
/!\ Note: this isn't needed since version 4.2.3
531-
532-
QT_EDITION_Unknown to QT_EDITION_OPENSOURCE
516+
Qt 4.4+ note: Starting in Qt 4.4 (?) libQtCLucene was added, and in 4.5
517+
libQtUiTools was added, both in /usr/lib. When using a system SDK (which will
518+
happen in the Xcode build), these libraries will not be found. To fix this problem,
519+
add symlinks to /usr/local:
533520

534-
Second change the default mkspec symlink so that it points to macx-g++:
535521

522+
sudo ln -s /usr/lib/libQtUiTools.a /usr/local/lib/
523+
sudo ln -s /usr/lib/libQtCLucene.dylib /usr/local/lib/
536524

537-
cd /usr/local/Qt4.3/mkspecs/
538-
sudo rm default
539-
sudo ln -sf macx-g++ default
540525

541-
542-
/!\ Note: this doesn't seem to be needed since version 4.4.
526+
These should then be found automatically on Leopard and above. Earlier systems
527+
may need some help by adding '-L/usr/local/lib' to CMAKE_SHARED_LINKER_FLAGS,
528+
CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS in the cmake build, or
529+
adding '/usr/local/lib' to LIBRARY_SEARCH_PATHS in the Xcode build.
543530

544531

545532
4.3. Install development frameworks for QGIS dependencies
546533
=========================================================
547534

548-
Download William Kyngesburye's excellent all in one framework that includes
549-
proj, gdal, sqlite3, etc.
535+
Download William Kyngesburye's excellent GDAL Complete package that includes
536+
PROJ, GEOS, GDAL, SQLite3, and image libraries, as frameworks. There is also
537+
a GSL framework.
550538

551539

552540
http://www.kyngchaos.com/wiki/software:frameworks
553541

554542

555543
Once downloaded, open and install the frameworks.
556544

557-
William provides an additional installer package for Postgresql/PostGIS. It's
558-
available here:
545+
William provides an additional installer package for Postgresql (for PostGIS support).
546+
Qgis just needs the libpq client library, so unless you want to setup the full
547+
Postgres + PostGIS server, all you need is the client-only package.
548+
It's available here:
559549

560550

561551
http://www.kyngchaos.com/wiki/software:postgres
@@ -567,6 +557,7 @@ Also available is a GRASS application:
567557
http://www.kyngchaos.com/wiki/software:grass
568558

569559

560+
570561
4.3.1. Additional Dependencies : General compatibility note
571562
===========================================================
572563

@@ -575,83 +566,64 @@ provided as frameworks or installers so we will need to build these from source.
575566
If you are wanting to build Qgis as a 64-bit application, you will need to
576567
provide the appropriate build commands to produce 64-bit support in dependencies.
577568
Likewise, for 32-bit support on Snow Leopard, you will need to override the
578-
default system architecture, which is 64-bit according to instructions for
569+
default system architecture, which is 64-bit, according to instructions for
579570
individual dependency packages.
580571

581572

582-
4.3.2. Additional Dependencies : GSL
583-
====================================
584-
585-
Retrieve the current version of the Gnu Scientific Library from:
586-
587-
588-
ftp://ftp.gnu.org/gnu/gsl/
589-
590-
591-
Then extract it and build it to a prefix of /usr/local. Double-click the source
592-
tarball to unpack it, then cd to the source folder and:
593-
573+
4.3.2. Additional Dependencies : Expat
574+
======================================
594575

595-
./configure
596-
make
597-
sudo make install
576+
Snow Leopard note: Snow Leopard includes a usable expat, so this step is
577+
not necessary on Snow Leopard.
598578

579+
Get the expat sources:
599580

600-
Snow Leopard note: For explicit 32-bit support in gsl, substitute the standard
601-
configure line with:
602581

582+
http://sourceforge.net/project/showfiles.php?group_id=10127
603583

604-
./configure --build=i386
605584

585+
Double-click the source tarball to unpack, then, in Terminal.app, cd to the source folder and:
606586

607-
And for 64-bit gsl:
608587

588+
./configure
589+
make
590+
sudo make install
609591

610-
./configure --build=x86_64
611592

593+
Leopard note: To compile for 64bit, substitute the standard configure line with:
612594

613595

614-
4.3.3. Additional Dependencies : Expat
615-
======================================
596+
./configure CFLAGS="-Os -arch x86_64"
616597

617-
Snow Leopard note: Snow Leopard includes a usable expat, so this step is
618-
not necessary.
619598

620-
Get the expat sources:
621599

600+
4.3.3. Additional Dependencies : Python
601+
=======================================
622602

623-
http://sourceforge.net/project/showfiles.php?group_id=10127
603+
Leopard and Snow Leopard note: Leopard and Snow Leopard include a usable
604+
Python 2.5 and 2.6, respectively. So there is no need to install Python on
605+
Leopard and Snow Leopard. You can still install Python from python.org if preferred.
624606

607+
Make sure you install at least the latest Python 2.5 from
625608

626-
Double-click the source tarball to unpack, then cd to the source folder and:
627609

610+
http://www.python.org/download/
628611

629-
./configure
630-
make
631-
sudo make install
632612

613+
Python 3 is a major change, and may have compatibility issues, so try it at your own risk.
633614

634615

635616
4.3.4. Additional Dependencies : SIP
636617
====================================
637618

638-
Leopard and Snow Leopard note: Leopard and Snow Leopard include a usable Python
639-
2.5 or 2.6, respectively. You can install Python from python.org if preferred.
640-
641-
Make sure you have the latest Python 2.5 from
642-
643-
644-
http://www.python.org/download/mac/
645-
646-
647619
Retrieve the python bindings toolkit SIP from
648620

649621

650622
http://www.riverbankcomputing.com/software/sip/download
651623

652624

653-
Double-click the source tarball to unpack it, then cd to the source folder
654-
and (this installs by default into the Python framework):
625+
Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder
626+
and (this installs by default into the Python framework, and is appropriate only for python.org Python installs):
655627

656628

657629
python configure.py
@@ -666,44 +638,41 @@ system path -- this is not a good idea. Use this configure command instead of t
666638
basic configure above:
667639

668640

669-
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin -e /usr/local/include -v /usr/local/share/sip
641+
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin \
642+
-e /usr/local/include -v /usr/local/share/sip
670643

671644

672645
Snow Leopard notes
673646

674-
If building on Snow Leopard, you need to use one of the following configure lines
675-
based on your installed version of Qt. If you are using 32-bit Qt (Qt Carbon):
647+
Similar to Leopard, you should install outside the system Python path.
648+
Also, you need to specify the architecture you want (requires at least SIP 4.9),
649+
and make sure to run the versioned python binary (this one responds to the
650+
'arch' command, 'python' does not). If you are using 32-bit Qt (Qt Carbon):
676651

677652

678-
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin -e /usr/local/include -v /usr/local/share/sip --arch i386
653+
python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin \
654+
-e /usr/local/include -v /usr/local/share/sip --arch=i386
679655

680656

681657
For 64-bit Qt (Qt Cocoa), use this configure line:
682658

683659

684-
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin -e /usr/local/include -v /usr/local/share/sip --arch x86_64
660+
python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin \
661+
-e /usr/local/include -v /usr/local/share/sip --arch=x86_64
685662

686663

687664

688665
4.3.5. Additional Dependencies : PyQt
689666
=====================================
690667

691-
If you encounter problems compiling PyQt using the instructions
692-
below you can also try adding python from your frameworks dir
693-
explicitly to your path e.g.
694-
695-
696-
export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
697-
698-
699668
Retrieve the python bindings toolkit for Qt from
700669

701670

702671
http://www.riverbankcomputing.com/software/pyqt/download
703672

704673

705-
Double-click the source tarball to unpack it, then cd to the source folder
706-
and (this installs by default into the Python framework):
674+
Double-click the source tarball to unpack it, then, in Terminal.app, cd to the source folder
675+
and (this installs by default into the Python framework, and is appropriate only for python.org Python installs):
707676

708677

709678
export QTDIR=/Developer/Applications/Qt
@@ -715,7 +684,9 @@ and (this installs by default into the Python framework):
715684

716685
Leopard notes
717686

718-
If building on Leopard, using Leopard's bundled Python, PyQt wants to install in the system path -- this is not a good idea. Use this configure command instead of the basic configure above:
687+
If building on Leopard, using Leopard's bundled Python, PyQt wants to install
688+
in the system path -- this is not a good idea. Use this configure command
689+
instead of the basic configure above:
719690

720691

721692
python configure.py -d /Library/Python/2.5/site-packages -b /usr/local/bin
@@ -727,23 +698,82 @@ Then make again.
727698

728699
Snow Leopard notes
729700

730-
If building on Snow Leopard, you need to use one of the following configure lines based on your installed version of Qt. If you are using 32-bit Qt (Qt Carbon):
701+
Similar to Leopard, you should install outside the system Python path.
702+
Also, you need to specify the architecture you want (requires at least PyQt 4.6),
703+
and make sure to run the versioned python binary (this one responds to the
704+
'arch' command, which is important for pyuic4, 'python' does not).
705+
If you are using 32-bit Qt (Qt Carbon):
731706

732707

733-
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch i386
708+
python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch i386
734709

735710

736711
For 64-bit Qt (Qt Cocoa), use this configure line:
737712

738713

739-
python configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64
714+
python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --use-arch x86_64
715+
716+
717+
718+
4.3.6. Additional Dependencies : Qwt/PyQwt
719+
==========================================
720+
721+
The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt.
722+
You can take care of both with the PyQwt source from:
723+
724+
725+
http://pyqwt.sourceforge.net/
726+
727+
728+
Double-click the tarball to unpack it.
729+
730+
Now, first edit qwtconfig.pri in the qwt-5.2 subdir and change some settings so
731+
you don't get a bloated debug static library (too bad they are configurable from
732+
qmake). Scroll down to the 'release/debug mode' block. Edit the last 'CONFIG +='
733+
line, within an 'else' block, and change 'debug' to 'release'. Also uncomment
734+
(remove # prefix) the line 'CONFIG += QwtDll'.
740735

736+
Save and close.
741737

738+
Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build and install:
739+
740+
741+
qmake -spec macx-g++
742+
make
743+
sudo make install
744+
745+
746+
The Qwt shared library is now installed in /usr/local/qwt-5.x.x[-svn] (x.x is the
747+
minor.point version, and it may be an SVN version). Remember this for QGIS and PyQwt configuration.
748+
749+
Now for PyQwt. Still in the Terminal:
750+
751+
752+
python configure.py --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
753+
--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
754+
make
755+
sudo make install
742756

743-
4.3.6. Additional Dependencies : Bison
757+
758+
Make sure to use the qwt install path from the Qwt build above.
759+
760+
Snow Leopard note
761+
762+
If using Qt Carbon, you need to specify which architectures to build, otherwise
763+
it will default to a combination that does not work (ie x86_64 for a Carbon Qt).
764+
This is not needed for Qt Cocoa. Configure as follows:
765+
766+
767+
python configure.py --extra-cflags="-arch i386" --extra-cxxflags="-arch i386" \
768+
--extra-lflags="-arch i386" --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
769+
--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
770+
771+
772+
773+
4.3.7. Additional Dependencies : Bison
744774
======================================
745775

746-
Leopard and Snow Leopard note: Leopard and Snow Leopard includes Bison 2.3, so this step can be skipped on Leopard and Snow Leopard.
776+
Leopard and Snow Leopard note: Leopard and Snow Leopard include Bison 2.3, so this step can be skipped on Leopard and Snow Leopard.
747777

748778
The version of bison available by default on Mac OS X 10.4 and older is too old so you need to
749779
get a more recent one on your system. Download at least version 2.3 from:
@@ -762,7 +792,7 @@ tarball to unpack it, then cd to the source folder and:
762792

763793

764794

765-
4.4. Install CMAKE for OSX
795+
4.4. Install CMake for OSX
766796
==========================
767797

768798
Get the latest source release from here:
@@ -786,9 +816,10 @@ then cd to the source folder and:
786816
4.5. Install subversion for OSX
787817
===============================
788818

789-
Leopard and Snow Leopard note: Leopard and Snow Leopard include SVN, so this step can be skipped on these Operating Systems.
819+
Leopard and Snow Leopard note: Leopard and Snow Leopard (Xcode 3+)
820+
include SVN, so this step can be skipped on Leopard and Snow Leopard.
790821

791-
The http://sourceforge.net/projects/macsvn/ (MacSVN) project has a downloadable
822+
The [http://sourceforge.net/projects/macsvn/MacSVN] project has a downloadable
792823
build of svn. If you are a GUI inclined person you may want to grab their gui
793824
client too. Get the command line client here:
794825

@@ -832,7 +863,7 @@ Now close and reopen your shell to get the updated vars.
832863
============================
833864

834865
Now we are going to check out the sources for QGIS. First we will create a
835-
directory for working in:
866+
directory for working in (or some folder of your choice):
836867

837868

838869
mkdir -p ~/dev/cpp cd ~/dev/cpp
@@ -872,93 +903,91 @@ I suggest you press 'p' to accept the key permanently.
872903
4.7. Configure the build
873904
========================
874905

875-
There are 2 different methods to build QGIS: the traditional Cmake method,
906+
There are 2 different methods to build QGIS: the traditional CMake method,
876907
and the new Xcode project (starting with QGIS 1.1). The Xcode project has
877-
additional bundling steps, though some optional Qgis features must be explicitly
878-
stated in a user configuration file. The Cmake build handles optional features,
908+
additional bundling steps, though some optional QGIS features must be explicitly
909+
stated in a user configuration file. The CMake build handles optional features,
879910
and some bundling steps are available with scripts in the mac directory.
880911

881912

882-
4.7.1. Configure the Cmake build
913+
4.7.1. Configure the CMake build
883914
================================
884915

885916
CMake supports out of source build so we will create a 'build' dir for the
886-
build process. By convention I build my software into a dir called 'apps' in
887-
my home directory. If you have the correct permissions you may want to build
917+
build process. OS X uses ${HOME}/Applications as a standard user app folder (it gives it the system app folder icon).
918+
If you have the correct permissions you may want to build
888919
straight into your /Applications folder. The instructions below assume you are
889-
building into a pre-existing ${HOME}/apps directory ...
920+
building into a pre-existing ${HOME}/Applications directory ...
890921

891922

892923
cd qgis
893924
mkdir build
894925
cd build
895-
cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ -D CMAKE_BUILD_TYPE=Release ..
896-
897-
898-
Leopard note: To find the custom install of SIP on Leopard, add ""-
899-
D SIP_BINARY_PATH=/usr/local/bin/sip"" to the cmake command above,
900-
before the .. at the end, ie:
901-
902-
903-
cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ \
904-
-D CMAKE_BUILD_TYPE=Release \
905-
-D SIP_BINARY_PATH=/usr/local/bin/sip \
906-
..
926+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release ..
907927

908928

909929
To use the application build of GRASS on OSX, you can optionally use the
910930
following cmake invocation (minimum GRASS 6.3 required, substitute the GRASS
911931
version as required):
912932

913933

914-
cmake -D CMAKE_INSTALL_PREFIX=${HOME}/apps/ \
915-
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/
916-
include \
917-
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
918-
-D CMAKE_BUILD_TYPE=Release \
919-
..
934+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
935+
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
936+
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
937+
..
920938

921939

922940
Or, to use a Unix-style build of GRASS, use the following cmake invocation
923941
(minimum GRASS version as stated in the Qgis requirements, substitute the GRASS
924942
path and version as required):
925943

926944

927-
cmake -D CMAKE_INSTALL_PREFIX=${HOME}/apps/ \
928-
-D GRASS_INCLUDE_DIR=/user/local/grass-6.4.0/include \
929-
-D GRASS_PREFIX=/user/local/grass-6.4.0 \
930-
-D CMAKE_BUILD_TYPE=Release \
931-
..
945+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
946+
-D GRASS_INCLUDE_DIR=/user/local/grass-6.4.0/include \
947+
-D GRASS_PREFIX=/user/local/grass-6.4.0 \
948+
..
949+
950+
951+
Leopard note: To find the custom install of SIP on Leopard, add
952+
'-D SIP_BINARY_PATH=/usr/local/bin/sip' to the cmake commands above,
953+
before the '..' at the end, ie:
932954

933955

934-
Snow Leopard note: To handle the appropriate version of Qt (32-bit or 64-bit), you will need to invoke cmake based on which version of Qt you installed.
956+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
957+
-D SIP_BINARY_PATH=/usr/local/bin/sip \
958+
..
935959

936-
For 32-bit Qt (Carbon) with GRASS-6.4:
937960

961+
Snow Leopard note: To handle the appropriate version of Qt (32-bit or 64-bit), you will need to invoke cmake based on which version of Qt you installed. Also, SIP/PyQt detection will fail for 32bit because Python runs 64bit.
938962

939-
cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ \
940-
-D CMAKE_BUILD_TYPE=Release \
941-
-D SIP_BINARY_PATH=/usr/local/bin/sip
942-
-D CMAKE_C_FLAGS=-m32 \
943-
-D CMAKE_CXX_FLAGS=-m32
944-
-D CMAKE_OSX_ARCHITECTURES=i386
945-
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
946-
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include\
947-
..
963+
For 32-bit Qt (Carbon) with GRASS-6.4, create a 32bit python script and add arch flags to the configuration:
964+
965+
966+
sudo cat >/usr/local/bin/python32 <<EOF
967+
#!/bin/sh
968+
exec arch -i386 /usr/bin/python2.6 \${1+"\$@"}
969+
EOF
970+
971+
sudo chmod +x /usr/local/bin/python32
972+
973+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
974+
-D SIP_BINARY_PATH=/usr/local/bin/sip \
975+
-D CMAKE_CXX_FLAGS="-arch i386" -D CMAKE_OSX_ARCHITECTURES=i386 \
976+
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
977+
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
978+
-D PYTHON_EXECUTABLE=/usr/local/bin/python32 \
979+
..
948980

949981

950982
For 64-bit Qt (Cocoa) with GRASS-6.4:
951983

952984

953-
cmake -D CMAKE_INSTALL_PREFIX=$HOME/apps/ \
954-
-D CMAKE_BUILD_TYPE=Release \
955-
-D SIP_BINARY_PATH=/usr/local/bin/sip
956-
-D CMAKE_C_FLAGS=-m64 \
957-
-D CMAKE_CXX_FLAGS=-m64
958-
-D CMAKE_OSX_ARCHITECTURES=x86_64
959-
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
960-
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include\
961-
..
985+
cmake -D CMAKE_INSTALL_PREFIX=~/Applications -D CMAKE_BUILD_TYPE=Release \
986+
-D SIP_BINARY_PATH=/usr/local/bin/sip \
987+
-D CMAKE_CXX_FLAGS="-arch x86_64" -D CMAKE_OSX_ARCHITECTURES=x86_64 \
988+
-D GRASS_INCLUDE_DIR=/Applications/GRASS-6.4.app/Contents/MacOS/include \
989+
-D GRASS_PREFIX=/Applications/GRASS-6.4.app/Contents/MacOS \
990+
..
962991

963992

964993

@@ -967,10 +996,10 @@ For 64-bit Qt (Cocoa) with GRASS-6.4:
967996

968997
In the mac/xcode folder in the source, duplicate the 'qgis_user-template.xcconfig'
969998
file and name it 'qgis_user.xcconfig'. A default build will use the KyngChaos
970-
frameworks, Postgres, GRASS 6.4, the python.org Python 2.5 and extra dependencies
999+
frameworks, Postgres, GRASS 6.4, the python.org Python 2.5 (for Tiger)
1000+
or the system Python (for Leopard and Snow Leopard) and extra dependencies
9711001
as described above, and compile for the current OSX architecture and version, so no
972-
extra configuration is necessary. If building on Leopard or newer, you may want to
973-
use the system Python, which requires editing qgis_user.xcconfig.
1002+
extra configuration is necessary.
9741003

9751004
See the mac/xcode/readme.rtf for details, if you need to customize the build.
9761005
The default build will also bundle the Qt frameworks, Postgres library, and
@@ -1017,17 +1046,10 @@ Alternatively, from within the mac/xcode directory, build with the command:
10171046

10181047
xcodebuild
10191048

1020-
Snow Leopard note: You can also build Qgis using the new llvm compilers supplied
1021-
with Xcode 3.2.x. To do this, you first need to export the proper compiler settings:
1022-
1023-
1024-
export CC=/Developer/usr/bin/llvm-gcc
1025-
export CXX=/Developer/usr/bin/llvm-g++
1026-
xcodebuild
1027-
10281049

1029-
The Qgis application will be found in the 'build/$SYSTEM/Release' folder in the xcode folder.
1030-
Copy this to whereever you like.
1050+
The Qgis application will be found in the 'build/$SDKSYS/Release' folder
1051+
in the xcode folder, where $SDKSYS is the system you configured for in your
1052+
qgis_user.xcconfig. Copy this to whereever you like.
10311053

10321054

10331055
5. Building on GNU/Linux
@@ -2173,7 +2195,7 @@ Get QGIS source from svn (svn co https://svn.osgeo.org/qgis/trunk/qgis qgis).
21732195

21742196
Create a 'Build' directory in the top level QGIS directory. This will be where all the build output will be generated.
21752197

2176-
Run Start-->All Programs-->CMake-->CMake.
2198+
Run Start>All Programs>CMake-->CMake.
21772199

21782200
In the 'Where is the source code:' box, browse to the top level QGIS directory.
21792201

@@ -2516,7 +2538,7 @@ support building the open source version of Qt for windows under MSVC.
25162538
Download Qt 4.x.x source for windows from
25172539

25182540

2519-
http:\\www.trolltech.com
2541+
http://qt.nokia.com/downloads
25202542

25212543

25222544
Unpack the source to

‎doc/INSTALL.t2t

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Building QGIS from source - step by step
2424

2525
% To generate the text version of this document:
2626
% txt2tags -t txt -o INSTALL INSTALL.t2t
27-
% To generate the moinmoin version of this document:
28-
% txt2tags -t moin -o INSTALL.moin INSTALL.t2t
27+
% To generate the mediawiki version of this document:
28+
% txt2tags -t wiki --no-enum-title -o INSTALL.wiki INSTALL.t2t
2929
% To generate the html version of this document:
3030
% txt2tags -t html -o INSTALL.html INSTALL.t2t
3131
% To generate the LaTeX version of this document:
@@ -54,7 +54,7 @@ always welcome for indicating possible mistakes.
5454
You can download this document as part of the Quantum GIS 'User and
5555
Installation Guide' in HTML and PDF format via http://www.qgis.org. A current
5656
version is also available at the wiki, see:
57-
http://wiki.qgis.org/qgiswiki/BuildingFromSource
57+
http://www.qgis.org/wiki/Installation_Guide
5858

5959
Translations of this document can also be downloaded at the documentation area
6060
of the Quantum GIS project at http://www.qgis.org. More information is
@@ -89,31 +89,30 @@ number of major projects (eg. KDE 4.0), now uses CMake (http://www.cmake.org)
8989
for building from source. The configure script in this directory simply checks
9090
for the existence of cmake and provides some clues to build QGIS.
9191

92-
For complete information, see the wiki at:
93-
http://wiki.qgis.org/qgiswiki/Building_with_CMake
94-
9592
== An overview of the dependencies required for building ==
9693

9794
'''Required build deps:'''
98-
* CMake >= 2.4.3
99-
* Flex, Bison
95+
* CMake >= 2.4.3
96+
* Flex, Bison
10097

10198
'''Required runtime deps:'''
102-
* Qt >= 4.3.0
103-
* Proj >= ? (known to work with 4.4.x)
104-
* GEOS >= 2.2 (3.0 is supported, maybe 2.1.x works too)
105-
* Sqlite3 >= ? (probably 3.0.0)
106-
* GDAL/OGR >= 1.4.x
99+
* Qt >= 4.3.0
100+
* Proj >= 4.4.x
101+
* GEOS >= 3.0
102+
* Sqlite3 >= 3.0.0
103+
* GDAL/OGR >= 1.4.x
107104

108105
'''Optional dependencies:'''
109-
* for GRASS plugin - GRASS >= 6.0.0
110-
* for georeferencer - GSL >= ? (works with 1.8)
111-
* for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
112-
* for gps plugin - expat >= ? (1.95 is OK)
113-
* for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
114-
* for PyQGIS - SIP >= 4.5, PyQt >= must match Qt version
106+
* for GRASS plugin - GRASS >= 6.0.0
107+
* for georeferencer - GSL >= 1.8
108+
* for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
109+
* for gps plugin - expat >= 1.95
110+
* for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
111+
* for PyQGIS - SIP >= 4.8, PyQt >= must match Qt version
112+
* for GPS tracking - Qwt >= 5.0
113+
115114
'''Recommended runtime deps:'''
116-
* for gps plugin - gpsbabel
115+
* for gps plugin - gpsbabel
117116

118117

119118

0 commit comments

Comments
 (0)
Please sign in to comment.