Ticket #5586: settings.pro

File settings.pro, 3.9 KB (added by Benoît LORAND <benoit.lorand@…>, 13 years ago)
Line 
1CONFIG += $$CCONFIG
2
3# Where binaries, includes and runtime assets are installed by 'make install'
4isEmpty( PREFIX ) {
5    PREFIX = /opt/mythtv
6}
7# Where the binaries actually locate the assets/filters/plugins at runtime
8isEmpty( RUNPREFIX ) {
9    RUNPREFIX = $$PREFIX
10}
11# Alternate library dir for OSes and packagers (e.g. lib64)
12isEmpty( LIBDIRNAME ) {
13    LIBDIRNAME = lib
14}
15# Where libraries, plugins and filters are installed
16isEmpty( LIBDIR ) {
17    LIBDIR = $${RUNPREFIX}/$${LIBDIRNAME}
18}
19
20LIBVERSION = 0.22
21VERSION = 0.22.0
22
23isEmpty(TARGET_OS) : win32 {
24    CONFIG += mingw
25    DEFINES += USING_MINGW USING_WINAUDIO USING_D3D USING_DIRECTX
26    DEFINES -= UNICODE
27    QMAKE_EXTENSION_SHLIB = dll
28    VERSION =
29    CONFIG_OPENGL_LIBS =
30    # Qt4 creates separate compile directories by default. This disables:
31    CONFIG -= debug_and_release debug_and_release_target
32    # win32-packager.pl builds Qt under DOS, but MythTV is built in MinGW.
33    # This corrects the moc tool path from a DOS-style to a unix style:
34    QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
35}
36
37# if CYGWIN compile, set up flag in CONFIG
38contains(TARGET_OS, CYGWIN) {
39    CONFIG += cygwin
40    QMAKE_EXTENSION_SHLIB=dll.a
41    DEFINES += CONFIG_CYGWIN
42}
43
44isEmpty(QMAKE_EXTENSION_SHLIB) {
45    QMAKE_EXTENSION_SHLIB=so
46}
47isEmpty(QMAKE_EXTENSION_LIB) {
48    QMAKE_EXTENSION_LIB=a
49}
50# For dependencies on Myth library filenames in TARGETDEPS
51MYTH_SHLIB_EXT=$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
52MYTH_LIB_EXT  =$${LIBVERSION}.$${QMAKE_EXTENSION_LIB}
53
54# Die on the (common) case where OS X users inadvertently use Fink's
55# Qt/X11 install instead of Qt/Mac. '
56contains(CONFIG_DARWIN, yes) {
57    !macx {
58        message(You are building with Qt/X11 on the Mac platform.)
59        message(Myth must be built with Qt/Mac instead.)
60        message((Fink users cannot use Fink's Qt, it's the wrong one.))
61        error(Unsupported configuration)
62    }
63}
64
65INCLUDEPATH += $${PREFIX}/include
66INCLUDEPATH += $$CONFIG_INCLUDEPATH
67INCLUDEPATH += /srv/lirc/include
68INCLUDEPATH += /srv/xorg/include
69
70# remove warn_{on|off} from CONFIG since we set it in our CFLAGS
71CONFIG -= warn_on warn_off
72
73# set empty RELEASE and DEBUG flags
74QMAKE_CFLAGS_DEBUG     =
75QMAKE_CFLAGS_RELEASE   =
76QMAKE_CXXFLAGS_DEBUG   =
77QMAKE_CXXFLAGS_RELEASE =
78
79# figure out compile flags based on qmake info
80QMAKE_CFLAGS   += $$ARCHFLAGS $$OPTFLAGS $$PROFILEFLAGS $$ECFLAGS
81QMAKE_CXXFLAGS += $$ARCHFLAGS $$OPTFLAGS $$PROFILEFLAGS $$ECXXFLAGS
82
83profile:CONFIG += debug
84
85QMAKE_CXXFLAGS += $$CONFIG_AUDIO_ARTS_CFLAGS
86QMAKE_CXXFLAGS += $$CONFIG_DIRECTFB_CXXFLAGS
87
88QMAKE_CFLAGS_SHLIB   = -DPIC -fPIC
89QMAKE_CXXFLAGS_SHLIB = -DPIC -fPIC
90
91# Allow compilation with Qt Embedded, if Qt is compiled without "-fno-rtti"
92QMAKE_CXXFLAGS -= -fno-exceptions -fno-rtti
93macx:QMAKE_CXXFLAGS += -Wno-long-double
94
95release:contains( ARCH_POWERPC, yes ) {
96    # Auto-inlining causes some Qt moc methods to go missing
97    macx:QMAKE_CXXFLAGS_RELEASE += -fno-inline-functions
98}
99
100
101# figure out defines
102DEFINES += $$CONFIG_DEFINES
103DEFINES += _GNU_SOURCE
104DEFINES += _FILE_OFFSET_BITS=64
105
106# construct linking path
107LOCAL_LIBDIR_X11 = /srv/xorg/lib
108!isEmpty( QMAKE_LIBDIR_X11 ) {
109    LOCAL_LIBDIR_X11 = -L$$QMAKE_LIBDIR_X11
110}
111QMAKE_LIBDIR_X11 = /srv/xorg/lib
112
113LOCAL_LIBDIR_OGL = /srv/xorg/lib
114!isEmpty( QMAKE_LIBDIR_OPENGL ) {
115    LOCAL_LIBDIR_OGL = -L$$QMAKE_LIBDIR_OPENGL
116}
117QMAKE_LIBDIR_OPENGL = /srv/xorg/lib
118
119OSS_LIBS = $$CONFiG_AUDIO_OSS_LIBS
120ALSA_LIBS = $$CONFIG_AUDIO_ALSA_LIBS
121ARTS_LIBS = $$CONFIG_AUDIO_ARTS_LIBS
122JACK_LIBS = $$CONFIG_AUDIO_JACK_LIBS
123
124EXTRA_LIBS = $$FREETYPE_LIBS -lmp3lame
125EXTRA_LIBS += $$CONFIG_FIREWIRE_LIBS
126EXTRA_LIBS += $$CONFIG_DIRECTFB_LIBS
127
128EXTRA_LIBS += $$LOCAL_LIBDIR_OGL
129EXTRA_LIBS += $$LOCAL_LIBDIR_X11
130EXTRA_LIBS += $$CONFIG_XV_LIBS
131EXTRA_LIBS += $$CONFIG_XRANDR_LIBS
132EXTRA_LIBS += $$CONFIG_XVMC_LIBS
133EXTRA_LIBS += $$CONFIG_OPENGL_LIBS
134EXTRA_LIBS += $$FRIBIDI_LIBS
135EXTRA_LIBS += -L/srv/lirc/lib
136
137LIRC_LIBS = $$CONFIG_LIRC_LIBS
138LIRC_LIBS += -L/srv/lirc/lib