1# Shared definitions included by the other .pro files
2# qmake should NOT be executed on this file directly
3
4# append debug or release
5CONFIG+= qt thread stl exceptions release       #release  #debug
6QT += xml
7
8#######################################
9# Control platform specific code
10# (the Qt platform scopes don't seem that useful; might be easier to just add DEFINES+=... explicitly
11
12unix {
13  DEFINES+=PLATFORM_BSD      # of course PLATFORM_BSD is more appropriate to some unices
14}
15
16macx {
17# NB This doesn't actually seem to be selected on Fink builds
18# (presumably it applies to Quartz builds instead)
19# Fink does seem to have a useful __DARWIN_X11__ define though,
20# which is used to set PLATFORM_BSD in libevolvotron/platform_specific.cpp
21  DEFINES+=PLATFORM_BSD
22}
23
24win32 {
25# You might want to add some appropriate code to libevolvotron/platform_specific.cpp
26# and set a #define here to select it
27}
28
29#######################################
30# Version numbering.  VERSION_NUMBER should have been set on the qmake command line (see .configure script)
31
32QMAKE_CXXFLAGS_RELEASE += '-DEVOLVOTRON_VERSION="$$VERSION_NUMBER"'
33QMAKE_CXXFLAGS_DEBUG   += '-DEVOLVOTRON_VERSION="$$VERSION_NUMBER"'
34QMAKE_CXXFLAGS_RELEASE += '-DEVOLVOTRON_BUILD="$$VERSION_NUMBER (Build options: $$BUILD_INFO Release)"'
35QMAKE_CXXFLAGS_DEBUG   += '-DEVOLVOTRON_BUILD="$$VERSION_NUMBER (Build options: $$BUILD_INFO Debug)"'
36
37# qmake's library code can use this too (but only for shared libraries which we don't use)
38VERSION=$$VERSION_NUMBER
39
40#######################################
41# Disable assertions in release version
42
43QMAKE_CXXFLAGS_RELEASE += -DNDEBUG
44QMAKE_CFLAGS_RELEASE += -DNDEBUG
45
46######################################
47# Other stuff:
48# Disable implicit cast from QString to/from char* - we should be using .local8Bit and ::fromLocal8Bit
49# NB We don't use the corresponding -DQT_NO_CAST_ASCII because it breaks QString("...") which is used all over the place
50# This probably wouldn't be usable until all the strings were moved out of the app - see Qt I18N docs.
51# Also add gcc threading option (not entirely clear whether this is needed but it doesn't seem to hurt)
52# Used to use -pthread -DBOOST_SP_USE_PTHREADS as a workround for debian bug 485434 (maybe only needed on sparc?)
53# but it seemed to cause problems with app not quitting once boost::program_options started being used.
54
55QMAKE_CXXFLAGS_RELEASE += -DQT_NO_ASCII_CAST
56QMAKE_CXXFLAGS_DEBUG += -DQT_NO_ASCII_CAST
57
58######################################
59# Hide those crufty moc_ files away
60
61MOC_DIR = moc
62
63##################
64# OPTION: Enable these options for profiling
65#
66#QMAKE_LFLAGS_RELEASE += -pg
67#QMAKE_CXXFLAGS_RELEASE += -pg
68