-
Notifications
You must be signed in to change notification settings - Fork 2
/
settings.pro
149 lines (124 loc) · 4.04 KB
/
settings.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
!win32-msvc* {
include ( config.mak )
}
CONFIG += $$CCONFIG
CONFIG += silent
cache()
PROJECTNAME = torc
LIBVERSION = 0.1
VERSION = 0.1.0
#check QT major version
lessThan(QT_MAJOR_VERSION, 5) {
error("Must build against Qt5")
}
# Where binaries, includes and runtime assets are installed by 'make install'
isEmpty(PREFIX) {
PREFIX = /usr/local
}
# Where the binaries actually locate the assets/filters/plugins at runtime
isEmpty(RUNPREFIX) {
RUNPREFIX = $$PREFIX
}
# Alternate library dir for OSes and packagers (e.g. lib64)
isEmpty(LIBDIRNAME) {
LIBDIRNAME = lib
}
# Where libraries, plugins and filters are installed
isEmpty(LIBDIR) {
LIBDIR = $${RUNPREFIX}/$${LIBDIRNAME}
}
win32 {
win32-msvc* {
CONFIG -= flat
CONFIG -= debug_and_release debug_and_release_target
DEFINES += _WIN32 WIN32 WIN32_LEAN_AND_MEAN NOMINMAX _USE_MATH_DEFINES
DEFINES += _CRT_SECURE_NO_WARNINGS
DEFINES += __STDC_CONSTANT_MACROS
DEFINES += __STDC_FORMAT_MACROS
DEFINES += __STDC_LIMIT_MACROS
QMAKE_EXTENSION_SHLIB = dll
VERSION =
DESTDIR = $${PWD}/bin/release
QMAKE_LIBDIR += $${PWD}/bin/release
MOC_DIR = $${PWD}/bin/release/moc
LIBS += -L$${PWD}/bin/release
QMAKE_CXXFLAGS *= /MD /MP
}
mingw {
CONFIG += mingw
DEFINES += WIN32 USING_MINGW WIN32_LEAN_AND_MEAN NOMINMAX STRICT
DEFINES -= UNICODE
QMAKE_EXTENSION_SHLIB = dll
VERSION =
CONFIG_OPENGL_LIBS =
# Qt4 creates separate compile directories by default. This disables:
CONFIG -= debug_and_release debug_and_release_target
# win32-packager.pl builds Qt under DOS, but Torc is built in MinGW.
# This corrects the moc tool path from a DOS-style to a unix style:
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
}
}
else
{
isEmpty(QMAKE_EXTENSION_SHLIB) {
QMAKE_EXTENSION_SHLIB=so
}
isEmpty(QMAKE_EXTENSION_LIB) {
QMAKE_EXTENSION_LIB=a
}
# For dependencies on Torc library filenames in POST_TARGETDEPS
TORC_SHLIB_EXT=$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
TORC_LIB_EXT =$${LIBVERSION}.$${QMAKE_EXTENSION_LIB}
# remove warn_{on|off} from CONFIG since we set it in our CFLAGS
CONFIG -= warn_on warn_off
profile:CONFIG += debug
# set empty RELEASE and DEBUG flags
QMAKE_CFLAGS_DEBUG =
QMAKE_CFLAGS_RELEASE =
QMAKE_CXXFLAGS_DEBUG =
QMAKE_CXXFLAGS_RELEASE =
# remove -fPIC since we handle it in configure
QMAKE_CFLAGS_SHLIB -= -fPIC
QMAKE_CFLAGS_STATIC_LIB -= -fPIC
QMAKE_LFLAGS_SHLIB -= -fPIC
# remove -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 from C++ preprocessor flgas
CXX_PP_FLAGS = $$CPPFLAGS
CXX_PP_FLAGS -= -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
# Globals in static libraries need special treatment on OS X
macx: QMAKE_CFLAGS_STATIC_LIB += -fno-common
# Allow compilation with Qt Embedded, if Qt is compiled without "-fno-rtti"
QMAKE_CXXFLAGS -= -fno-exceptions -fno-rtti
# construct linking path
LOCAL_LIBDIR_X11 =
!isEmpty(QMAKE_LIBDIR_X11) {
LOCAL_LIBDIR_X11 = -L$$QMAKE_LIBDIR_X11
}
QMAKE_LIBDIR_X11 =
LOCAL_LIBDIR_OGL =
!isEmpty(QMAKE_LIBDIR_OPENGL) {
LOCAL_LIBDIR_OGL = -L$$QMAKE_LIBDIR_OPENGL
}
QMAKE_LIBDIR_OPENGL =
!isEmpty(QMAKE_LIBDIR_QT) {
!macx {
LATE_LIBS += "-L$$QMAKE_LIBDIR_QT"
QMAKE_LIBDIR_QT = ""
}
macx:!qt_framework {
LATE_LIBS += "-L$$QMAKE_LIBDIR_QT"
QMAKE_LIBDIR_QT = ""
}
}
EXTRA_LIBS = $$EXTRALIBS
}
INCLUDEPATH += $$unique(CONFIG_INCLUDEPATH)
# figure out compile flags based on qmake info
QMAKE_CFLAGS += $$CPPFLAGS $$CFLAGS
QMAKE_CXXFLAGS += $$CXXPPFLAGS $$ECXXFLAGS
release:contains( ARCH_POWERPC, yes ) {
# Auto-inlining causes some Qt moc methods to go missing
macx:QMAKE_CXXFLAGS_RELEASE += -fno-inline-functions
}
# figure out defines
DEFINES += $$CONFIG_DEFINES
DEFINES += _GNU_SOURCE