~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to src/angle/src/config.pri

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
ImportĀ upstreamĀ versionĀ 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file contains build options that are relevant for both the compilers
 
2
# and the khronos implementation libraries.
 
3
 
 
4
ANGLE_DIR = $$(ANGLE_DIR)
 
5
isEmpty(ANGLE_DIR) {
 
6
    ANGLE_DIR = $$PWD/../../3rdparty/angle
 
7
} else {
 
8
    !build_pass:message("Using external ANGLE from $$ANGLE_DIR")
 
9
}
 
10
 
 
11
!exists($$ANGLE_DIR/src) {
 
12
    error("$$ANGLE_DIR does not contain ANGLE")
 
13
}
 
14
 
 
15
win32 {
 
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:)=^)%)"
 
20
    }
 
21
}
 
22
 
 
23
defineReplace(addGnuPath) {
 
24
    unset(gnuPath)
 
25
    gnuPath = $$1
 
26
    !isEmpty(gnuPath):!isEmpty(GNUTOOLS) {
 
27
        eval(gnuPath = $${GNUTOOLS} && $$gnuPath)
 
28
        silent: eval(gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$val_escape($$gnuPath))
 
29
    }
 
30
    return($$gnuPath)
 
31
}
 
32
 
 
33
# Defines for modifying Win32 headers
 
34
DEFINES +=  _WINDOWS \
 
35
            _UNICODE \
 
36
            _CRT_SECURE_NO_DEPRECATE \
 
37
            _HAS_EXCEPTIONS=0 \
 
38
            NOMINMAX \
 
39
            WIN32_LEAN_AND_MEAN=1
 
40
 
 
41
# Defines specifying the API version (0x0600 = Vista)
 
42
DEFINES +=  _WIN32_WINNT=0x0600 WINVER=0x0600
 
43
 
 
44
# ANGLE specific defines
 
45
DEFINES +=  ANGLE_DISABLE_TRACE \
 
46
            ANGLE_DISABLE_PERF \
 
47
            ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0 \
 
48
            ANGLE_USE_NEW_PREPROCESSOR=1
 
49
 
 
50
CONFIG(debug, debug|release) {
 
51
    DEFINES += _DEBUG
 
52
} else {
 
53
    DEFINES += NDEBUG
 
54
}
 
55
 
 
56
# c++11 is needed by MinGW to get support for unordered_map.
 
57
CONFIG -= qt
 
58
CONFIG += stl rtti_off exceptions c++11
 
59
 
 
60
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
 
61
contains(QT_CONFIG, build_all):CONFIG += build_all
 
62
 
 
63
INCLUDEPATH += . .. $$PWD/../include
 
64
 
 
65
DESTDIR = $$QT_BUILD_TREE/lib
 
66
DLLDESTDIR = $$QT_BUILD_TREE/bin
 
67
 
 
68
msvc {
 
69
    # Disabled Warnings:
 
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"
 
80
    # Optimizations
 
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
 
89
 
 
90
    QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
 
91
}
 
92
 
 
93
gcc {
 
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
 
98
 
 
99
    QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -Wno-reorder -Wno-conversion-null -Wno-delete-non-virtual-dtor
 
100
}
 
101
 
 
102
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
 
103
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE