annotate README.Qt41 @ 282:d9319859a4cf tip

(none)
author benoitrigolleau
date Fri, 31 Oct 2008 11:00:24 +0000
parents 00b5875d8c30
children
rev   line source
lbajardsilogic@0 1
lbajardsilogic@42 2 Building Sound Access using Qt 4.0 or 4.1
lbajardsilogic@0 3 =============================================
lbajardsilogic@0 4
lbajardsilogic@42 5 The Sound Access source code should build fine using Qt versions
lbajardsilogic@0 6 4.0, 4.1 or 4.2.
lbajardsilogic@0 7
lbajardsilogic@0 8 However, TrollTech introduced an incompatible change to the handling
lbajardsilogic@0 9 of quoted text in version 4.2 of the qmake utility, that makes it
lbajardsilogic@0 10 impossible for us to provide build scripts that will work with both
lbajardsilogic@0 11 older and newer versions.
lbajardsilogic@0 12
lbajardsilogic@0 13 The provided scripts are for Qt 4.2. If you try to build using Qt 4.0
lbajardsilogic@0 14 or 4.1, you will get errors like these:
lbajardsilogic@0 15
lbajardsilogic@0 16 main/MainWindow.cpp:3737: error: parse error before `:' token
lbajardsilogic@0 17 main/MainWindow.cpp:3737:66: invalid suffix "M" on integer constant
lbajardsilogic@0 18 main/MainWindow.cpp:3761:95: too many decimal points in number
lbajardsilogic@0 19
lbajardsilogic@0 20 To fix this, you will need to patch the file sv.prf in this directory.
lbajardsilogic@0 21 The easiest way to do that if you have a suitable patch utility to
lbajardsilogic@0 22 hand, is to feed this file (README.Qt41) directly into patch, like this:
lbajardsilogic@0 23
lbajardsilogic@0 24 patch < README.Qt41
lbajardsilogic@0 25
lbajardsilogic@0 26 If that succeeds, it will modify the file "sv.prf" from a Qt 4.2
lbajardsilogic@0 27 compatible format into one that is compatible with Qt 4.0 and 4.1.
lbajardsilogic@0 28
lbajardsilogic@0 29 If you want to apply the patch some other way, here it is, in unified
lbajardsilogic@0 30 diff format:
lbajardsilogic@0 31
lbajardsilogic@0 32 --- sv.prf 2006-11-10 11:08:04.000000000 +0000
lbajardsilogic@0 33 +++ sv.prf.qt41 2006-11-10 11:08:31.000000000 +0000
lbajardsilogic@0 34 @@ -83,9 +83,9 @@
lbajardsilogic@0 35 system(pkg-config --exists $$PKG) {
lbajardsilogic@0 36 VERSION = $$system(pkg-config --modversion $$PKG)
lbajardsilogic@0 37 PACKAGE_SYMBOL = $$system(echo $$PKG | tr '[a-z-]' '[A-Z_]')
lbajardsilogic@0 38 - VERSION_SYMBOL = $$PACKAGE_SYMBOL'_VERSION'
lbajardsilogic@0 39 + VERSION_SYMBOL = $$system(echo $$PKG"_VERSION" | tr '[a-z-]' '[A-Z_]')
lbajardsilogic@0 40 DEFINES += HAVE_$$PACKAGE_SYMBOL
lbajardsilogic@0 41 - QMAKE_CXXFLAGS += -D"'"$$VERSION_SYMBOL='"'$$VERSION'"'"'"
lbajardsilogic@0 42 + QMAKE_CXXFLAGS += -D'$$VERSION_SYMBOL="$$VERSION"'
lbajardsilogic@0 43 QMAKE_CXXFLAGS += $$system(pkg-config --cflags $$PKG)
lbajardsilogic@0 44 LIBS += $$system(pkg-config --libs $$PKG)
lbajardsilogic@0 45 message("Using pkg-config package $$PKG with version $$VERSION")
lbajardsilogic@0 46 @@ -142,7 +142,7 @@
lbajardsilogic@0 47 contains(SV_UNIT_PACKAGES, sndfile):!contains(DEFINES, HAVE_SNDFILE):error("sndfile library required")
lbajardsilogic@0 48 contains(SV_UNIT_PACKAGES, samplerate):!contains(DEFINES, HAVE_SAMPLERATE):error("libsamplerate required")
lbajardsilogic@0 49
lbajardsilogic@0 50 -VERSION_CFLAGS += -D"'"SVNREV='"'$$system(svnversion -n .)'"'"'"
lbajardsilogic@0 51 +VERSION_CFLAGS += -D'SVNREV="$$system(svnversion -n .)"'
lbajardsilogic@0 52
lbajardsilogic@0 53 QMAKE_CXXFLAGS_DEBUG += -DBUILD_DEBUG $$VERSION_CFLAGS
lbajardsilogic@0 54 QMAKE_CXXFLAGS_RELEASE += -DBUILD_RELEASE $$VERSION_CFLAGS