Skip to content

Commit 4e09a05

Browse files
author
kyngchaos
committedJan 10, 2010
add Qwt build instructions for OSX; misc cleanup for OSX
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12726 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 342940b commit 4e09a05

File tree

1 file changed

+77
-42
lines changed

1 file changed

+77
-42
lines changed
 

‎doc/INSTALL.t2t

Lines changed: 77 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -357,27 +357,29 @@ on qgis.nsi and choose the option 'Compile NSIS Script'.
357357
% ----Please leave this break marker here for clarity - it wont be rendered ---
358358
% -----------------------------------------------------------------------------
359359

360-
= Building on Mac OSX using frameworks and cmake (QGIS > 0.8) =
360+
= Building on Mac OSX using frameworks and cmake or Xcode =
361361

362362

363363
In this approach I will try to avoid as much as possible building dependencies
364364
from source and rather use frameworks wherever possible.
365365

366-
Included are a few notes for building on Mac OS X 10.5 (__Leopard__) and 10.6
367-
(__Snow Leopard__).
366+
The base system here is Mac OS X 10.4 (__Tiger__) and below. Included are a few notes
367+
for building on Mac OS X 10.5 (__Leopard__) and 10.6 (__Snow Leopard__).
368368

369369
__Snow Leopard note:__ A cmake/qt/sip bug currently exists where a 32-bit
370370
cmake build fails to provide python bindings. This means that python plugin support
371371
is currently lacking for 32-bit builds using cmake in Snow Leopard. See the Xcode
372372
build method to if you require python support.
373373

374-
== Install XCODE ==
374+
== Install Xcode ==
375375

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

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

382384
```
383385
cd /Developer/SDKs/MacOSX10.4u.sdk/usr/
@@ -392,8 +394,7 @@ You need a minimum of Qt-4.3.0. I suggest getting the latest.
392394
__Snow Leopard note:__ If you are building on Snow Leopard, you will need to
393395
decide between 32-bit support in the older, Qt Carbon branch, or 64-bit
394396
support in the Qt Cocoa branch. Appropriate installers are available for both
395-
as of Qt-4.5.2, and the release candidate of Qt-4.6.0-cocoa works fairly well
396-
with Qgis as tested with nightly snapshots of sip and pyqt.
397+
as of Qt-4.5.2. Qt 4.6+ is recommended for Cocoa.
397398

398399
```
399400
http://qt.nokia.com/downloads
@@ -405,7 +406,10 @@ addition to the non-debug frameworks.
405406
Once downloaded open the dmg and run the installer. Note you need admin
406407
privileges to install.
407408

408-
__Qt 4.4+ note:__ Starting in Qt 4.4 (?) libQtCLucene was added, and in 4.5 libQtUiTools was added, both in /usr/lib. When using a system SDK (which will happen in the Xcode build), these libraries will not be found. To fix this problem, add symlinks to /usr/local:
409+
__Qt 4.4+ note:__ Starting in Qt 4.4 (?) libQtCLucene was added, and in 4.5
410+
libQtUiTools was added, both in /usr/lib. When using a system SDK (which will
411+
happen in the Xcode build), these libraries will not be found. To fix this problem,
412+
add symlinks to /usr/local:
409413

410414
```
411415
sudo ln -s /usr/lib/libQtUiTools.a /usr/local/lib/
@@ -420,7 +424,9 @@ adding '/usr/local/lib' to LIBRARY_SEARCH_PATHS in the Xcode build.
420424

421425
== Install development frameworks for QGIS dependencies ==
422426

423-
Download William Kyngesburye's excellent GDAL Complete package that includes PROJ, GEOS, GDAL, SQLite3, and image libraries, as frameworks.
427+
Download William Kyngesburye's excellent GDAL Complete package that includes
428+
PROJ, GEOS, GDAL, SQLite3, and image libraries, as frameworks. There is also
429+
a GSL framework.
424430

425431
```
426432
http://www.kyngchaos.com/wiki/software:frameworks
@@ -453,31 +459,6 @@ Likewise, for 32-bit support on Snow Leopard, you will need to override the
453459
default system architecture, which is 64-bit, according to instructions for
454460
individual dependency packages.
455461

456-
=== Additional Dependencies : GSL ===
457-
458-
Retrieve the current version of the Gnu Scientific Library from:
459-
460-
```
461-
ftp://ftp.gnu.org/gnu/gsl/
462-
```
463-
464-
Then extract it and build it to a prefix of /usr/local. Double-click the source
465-
tarball to unpack it, then, in Terminal.app, cd to the source folder and:
466-
467-
```
468-
./configure
469-
make
470-
sudo make install
471-
```
472-
473-
__Snow Leopard note:__ Snow Leopard compiles 64bit by default.
474-
For explicit 32-bit support in gsl, substitute the standard configure line with:
475-
476-
```
477-
./configure CFLAGS="-Os -arch i386"
478-
```
479-
480-
481462
=== Additional Dependencies : Expat ===
482463

483464
__Snow Leopard note:__ Snow Leopard includes a usable expat, so this step is
@@ -508,7 +489,7 @@ __Leopard note:__ To compile for 64bit, substitute the standard configure line w
508489

509490
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include a usable
510491
Python 2.5 and 2.6, respectively. So there is no need to install Python on
511-
Leopard and Snow Leopard You can still install Python from python.org if preferred.
492+
Leopard and Snow Leopard. You can still install Python from python.org if preferred.
512493

513494
Make sure you install at least the latest Python 2.5 from
514495

@@ -619,6 +600,60 @@ python2.6 configure.py -d /Library/Python/2.6/site-packages -b /usr/local/bin --
619600
```
620601

621602

603+
=== Additional Dependencies : Qwt/PyQwt ===
604+
605+
The GPS tracking feature uses Qwt. Some popular 3rd-party plugins use PyQwt.
606+
You can take care of both with the PyQwt source from:
607+
608+
```
609+
http://pyqwt.sourceforge.net/
610+
```
611+
612+
Double-click the tarball to unpack it.
613+
614+
Now, first edit qwtconfig.pri in the qwt-5.2 subdir and change some settings so
615+
you don't get a bloated debug static library (too bad they are configurable from
616+
qmake). Scroll down to the 'release/debug mode' block. Edit the last 'CONFIG +='
617+
line, within an 'else' block, and change 'debug' to 'release'. Also uncomment
618+
(remove # prefix) the line 'CONFIG += QwtDll'.
619+
620+
Save and close.
621+
622+
Now, cd into the qwt-5.2 subdir in a Terminal. Type these commands to build and install:
623+
624+
```
625+
qmake -spec macx-g++
626+
make
627+
sudo make install
628+
```
629+
630+
The Qwt shared library is now installed in /usr/local/qwt-5.x.x[-svn] (x.x is the
631+
minor.point version, and it may be an SVN version). Remember this for QGIS and PyQwt configuration.
632+
633+
Now for PyQwt. Still in the Terminal:
634+
635+
```
636+
python configure.py --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
637+
--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
638+
make
639+
sudo make install
640+
```
641+
642+
Make sure to use the qwt install path from the Qwt build above.
643+
644+
__Snow Leopard note__
645+
646+
If using Qt Carbon, you need to specify which architectures to build, otherwise
647+
it will default to a combination that does not work (ie x86_64 for a Carbon Qt).
648+
This is not needed for Qt Cocoa. Configure as follows:
649+
650+
```
651+
python configure.py --extra-cflags="-arch i386" --extra-cxxflags="-arch i386" \
652+
--extra-lflags="-arch i386" --extra-include-dirs=/usr/local/qwt-5.2.1-svn/include \
653+
--extra-lib-dirs=/usr/local/qwt-5.2.1-svn/lib --extra-libs=qwt
654+
```
655+
656+
622657
=== Additional Dependencies : Bison ===
623658

624659
__Leopard and Snow Leopard note:__ Leopard and Snow Leopard include Bison 2.3, so this step can be skipped on Leopard and Snow Leopard.
@@ -639,7 +674,7 @@ make
639674
sudo make install
640675
```
641676

642-
== Install CMAKE for OSX ==
677+
== Install CMake for OSX ==
643678

644679
Get the latest source release from here:
645680

@@ -742,13 +777,13 @@ I suggest you press 'p' to accept the key permanently.
742777

743778
== Configure the build ==
744779

745-
There are 2 different methods to build QGIS: the traditional Cmake method,
780+
There are 2 different methods to build QGIS: the traditional CMake method,
746781
and the new Xcode project (starting with QGIS 1.1). The Xcode project has
747-
additional bundling steps, though some optional Qgis features must be explicitly
748-
stated in a user configuration file. The Cmake build handles optional features,
782+
additional bundling steps, though some optional QGIS features must be explicitly
783+
stated in a user configuration file. The CMake build handles optional features,
749784
and some bundling steps are available with scripts in the mac directory.
750785

751-
=== Configure the Cmake build ===
786+
=== Configure the CMake build ===
752787

753788
CMake supports out of source build so we will create a 'build' dir for the
754789
build process. OS X uses ${HOME}/Applications as a standard user app folder (it gives it the system app folder icon).

0 commit comments

Comments
 (0)