Ticket #8040: settings.pro

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