1
# This file contains build options that are relevant for both the compilers
2
# and the khronos implementation libraries.
4
ANGLE_DIR = $$(ANGLE_DIR)
6
ANGLE_DIR = $$PWD/../../3rdparty/angle
8
!build_pass:message("Using external ANGLE from $$ANGLE_DIR")
11
!exists($$ANGLE_DIR/src) {
12
error("$$ANGLE_DIR does not contain ANGLE")
16
GNUTOOLS_DIR=$$PWD/../../../../gnuwin32/bin
17
exists($$GNUTOOLS_DIR/gperf.exe) {
18
# Escape closing parens when expanding the variable, otherwise cmd confuses itself.
19
GNUTOOLS = "(set PATH=$$replace(GNUTOOLS_DIR, [/\\\\], $${QMAKE_DIR_SEP});%PATH:)=^)%)"
23
defineReplace(addGnuPath) {
26
!isEmpty(gnuPath):!isEmpty(GNUTOOLS) {
27
eval(gnuPath = $${GNUTOOLS} && $$gnuPath)
28
silent: eval(gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$val_escape($$gnuPath))
33
# Defines for modifying Win32 headers
36
_CRT_SECURE_NO_DEPRECATE \
41
# Defines specifying the API version (0x0600 = Vista)
42
DEFINES += _WIN32_WINNT=0x0600 WINVER=0x0600
44
# ANGLE specific defines
45
DEFINES += ANGLE_DISABLE_TRACE \
47
ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0 \
48
ANGLE_USE_NEW_PREPROCESSOR=1
50
CONFIG(debug, debug|release) {
56
# c++11 is needed by MinGW to get support for unordered_map.
58
CONFIG += stl rtti_off exceptions c++11
60
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
61
contains(QT_CONFIG, build_all):CONFIG += build_all
63
INCLUDEPATH += . .. $$PWD/../include
65
DESTDIR = $$QT_BUILD_TREE/lib
66
DLLDESTDIR = $$QT_BUILD_TREE/bin
70
# 4100: 'identifier' : unreferenced formal parameter
71
# 4127: conditional expression is constant
72
# 4189: 'identifier' : local variable is initialized but not referenced
73
# 4239: nonstandard extension used : 'token' : conversion from 'type' to 'type'
74
# 4244: 'argument' : conversion from 'type1' to 'type2', possible loss of data
75
# 4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
76
# 4512: 'class' : assignment operator could not be generated
77
# 4702: unreachable code
78
QMAKE_CFLAGS_WARN_ON -= -W3
79
QMAKE_CFLAGS_WARN_ON += -W4 -wd"4100" -wd"4127" -wd"4189" -wd"4239" -wd"4244" -wd"4245" -wd"4512" -wd"4702"
81
# /Oy: Omits frame pointer (x86 only).
82
# /Gy: Enables function-level linking.
83
# /GS: Buffers security check.
84
# /Gm-: Disable minimal rebuild.
85
# /RTC1: Run time error checking
86
QMAKE_CFLAGS_RELEASE += -Oy- -Gy -GS -Gm-
87
QMAKE_CFLAGS_DEBUG += -Oy- -Gy -GS -Gm- -RTC1
88
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -Zi $$QMAKE_CFLAGS_RELEASE
90
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
94
QMAKE_CFLAGS_WARN_ON += -Wno-unknown-pragmas -Wno-comment -Wno-missing-field-initializers \
95
-Wno-switch -Wno-unused-parameter -Wno-write-strings -Wno-sign-compare -Wno-missing-braces \
96
-Wno-unused-but-set-variable -Wno-unused-variable -Wno-narrowing -Wno-maybe-uninitialized \
97
-Wno-strict-aliasing -Wno-type-limits
99
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -Wno-reorder -Wno-conversion-null -Wno-delete-non-virtual-dtor
102
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
103
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE