changeset 1292:0c82a10b5c3e project-file-rework

Tidier noconfig file
author Chris Cannam
date Tue, 25 Oct 2016 21:10:48 +0100 (2016-10-25)
parents e705188523b6
children 7304616053ff
files noconfig.pri
diffstat 1 files changed, 105 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/noconfig.pri	Tue Oct 25 21:06:38 2016 +0100
+++ b/noconfig.pri	Tue Oct 25 21:10:48 2016 +0100
@@ -3,49 +3,120 @@
 DEFINES += NDEBUG BUILD_RELEASE
 DEFINES += NO_TIMING
 
+# Full set of defines expected for all platforms when we have the
+# sv-dependency-builds subrepo available to provide the dependencies.
+
+DEFINES += \
+        HAVE_BZ2 \
+	HAVE_FFTW3 \
+	HAVE_FFTW3F \
+	HAVE_SNDFILE \
+	HAVE_SAMPLERATE \
+	HAVE_RUBBERBAND \
+	HAVE_LIBLO \
+	HAVE_MAD \
+	HAVE_ID3TAG \
+	HAVE_PORTAUDIO
+
+# Default set of libs for the above. Config sections below may update
+# these.
+
+LIBS += \
+        -lbz2 \
+	-lrubberband \
+	-lfftw3 \
+	-lfftw3f \
+	-lsndfile \
+	-lFLAC \
+	-logg \
+	-lvorbis \
+	-lvorbisenc \
+	-lvorbisfile \
+	-logg \
+	-lmad \
+	-lid3tag \
+	-lportaudio \
+	-lsamplerate \
+	-lz \
+	-lsord-0 \
+	-lserd-0 \
+	-llo \
+	-lcapnp \
+	-lkj
+
 win32-g++ {
+
+    # This config is currently used for 32-bit Windows builds.
+
     INCLUDEPATH += sv-dependency-builds/win32-mingw/include
     LIBS += -Lrelease -Lsv-dependency-builds/win32-mingw/lib
+
+    DEFINES += NOMINMAX _USE_MATH_DEFINES
+
+    # Don't have liblo
+    DEFINES -= HAVE_LIBLO
+    LIBS -= -llo
+    
+    LIBS += -lwinmm -lws2_32
 }
 
 win32-msvc* {
-   # We actually expect MSVC to be used only for 64-bit builds,
-   # though the qmake spec is still called win32-msvc*
-   INCLUDEPATH += sv-dependency-builds/win64-msvc/include
-# bah, this is happening even if not debug build
-#    CONFIG(debug) {
-#        LIBS += -NODEFAULTLIB:MSVCRT -Ldebug \
-#            -L../sonic-visualiser/sv-dependency-builds/win64-msvc/lib/debug \
-#            -L../sonic-visualiser/sv-dependency-builds/win64-msvc/lib
-#    }
-   CONFIG(release) {
-       LIBS += -Lrelease \
-           -L../sonic-visualiser/sv-dependency-builds/win64-msvc/lib
-   }
+
+    # This config is actually used only for 64-bit Windows builds.
+    # even though the qmake spec is still called win32-msvc*. If
+    # we want to do 32-bit builds with MSVC as well, then we'll
+    # need to add a way to distinguish the two.
+    
+    INCLUDEPATH += sv-dependency-builds/win64-msvc/include
+    
+    CONFIG(debug) {
+        LIBS += -NODEFAULTLIB:MSVCRT -Ldebug \
+            -L../sonic-visualiser/sv-dependency-builds/win64-msvc/lib/debug \
+            -L../sonic-visualiser/sv-dependency-builds/win64-msvc/lib
+    }
+    CONFIG(release) {
+        LIBS += -Lrelease \
+            -L../sonic-visualiser/sv-dependency-builds/win64-msvc/lib
+    }
+
+    DEFINES += NOMINMAX _USE_MATH_DEFINES
+
+    # No Ogg/FLAC support in the sndfile build on this platform yet
+    LIBS -= -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile
+
+    # These have different names
+    LIBS -= -lsord-0 -lserd-0
+    LIBS += -lsord -lserd
+
+    # Don't have liblo
+    DEFINES -= HAVE_LIBLO
+    LIBS -= -llo
+    
+    LIBS += -ladvapi32 -lwinmm -lws2_32
 }
 
-mac* {
-   INCLUDEPATH += sv-dependency-builds/osx/include
-   LIBS += -Lsv-dependency-builds/osx/lib
+macx* {
+
+    # All Mac builds are 64-bit these days.
+
+    INCLUDEPATH += sv-dependency-builds/osx/include
+    LIBS += -Lsv-dependency-builds/osx/lib
+
+    DEFINES += HAVE_COREAUDIO
+    LIBS += \
+        -framework CoreAudio \
+	-framework CoreMidi \
+	-framework AudioUnit \
+	-framework AudioToolbox \
+	-framework CoreFoundation \
+	-framework CoreServices \
+	-framework Accelerate
 }
 
-   DEFINES += HAVE_BZ2 HAVE_FFTW3 HAVE_FFTW3F HAVE_SNDFILE HAVE_SAMPLERATE HAVE_VAMP HAVE_VAMPHOSTSDK HAVE_RUBBERBAND HAVE_DATAQUAY HAVE_LIBLO HAVE_MAD HAVE_ID3TAG HAVE_PORTAUDIO
+linux* {
 
-   LIBS += -lbz2 -lrubberband -lfftw3 -lfftw3f -lsndfile -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -logg -lmad -lid3tag -lportaudio -lsamplerate -lz -lsord-0 -lserd-0 -llo
+    message("Building without ./configure on Linux is unlikely to work")
+    message("If you really want to try it, remove this from noconfig.pri")
+    error("Refusing to build without ./configure first")
+}
 
-   win* {
-       DEFINES += NOMINMAX _USE_MATH_DEFINES
-       DEFINES -= HAVE_LIBLO
-       LIBS += -lwinmm -lws2_32
-   }
-   win32-msvc* {
-       LIBS -= -lFLAC -logg -lvorbis -lvorbisenc -lvorbisfile -lsord-0 -lserd-0 -llo
-       LIBS += -lsord -lserd -ladvapi32
-   }
-   macx* {
-       DEFINES += HAVE_COREAUDIO MALLOC_IS_ALIGNED HAVE_LIBSAMPLERATE HAVE_VDSP
-       LIBS += -framework CoreAudio -framework CoreMidi -framework AudioUnit -framework AudioToolbox -framework CoreFoundation -framework CoreServices -framework Accelerate
-   }
-
-
-LIBS += -lcapnp -lkj