summaryrefslogtreecommitdiffstats
path: root/customcontext/customcontext.pro
blob: aae56602687c1f02ad96b0683393da67c99f844c (plain)
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
TEMPLATE=lib
TARGET=customcontext

CONFIG += plugin

contains(QT_VERSION, ^5\\.[2-9]\\..*) {
    message("Using Qt 5.2 or later")
    CONFIG += customcontext_qt520
}

QT += gui-private core-private quick-private qml-private
!customcontext_qt520:{
    QT += v8-private
}

message("")

verbose:{
    message("verbose ..................: yes")
    DEFINES+=CUSTOMCONTEXT_DEBUG
} else {
    message("verbose ..................: no")
}



############################################################
#
# Rendering hooks
#

dither:{
    message("dither ...................: yes")
    DEFINES += CUSTOMCONTEXT_DITHER
    SOURCES += renderhooks/ordereddither2x2.cpp
    HEADERS += renderhooks/ordereddither2x2.h
} else {
    message("dither ...................: no")
}



############################################################
#
# Textures
#

!customcontext_qt520:{
    atlastexture:{
        message("atlastexture .............: yes")
        DEFINES += CUSTOMCONTEXT_ATLASTEXTURE
        SOURCES += texture/atlastexture.cpp
        HEADERS += texture/atlastexture.h
        INCLUDEPATH += texture
    } else {
        message("atlastexture .............: no")
    }

    threaduploadtexture:{
        message("threaduploadtexture ......: yes")
        DEFINES += CUSTOMCONTEXT_THREADUPLOADTEXTURE
        SOURCES += texture/threaduploadtexture.cpp
        HEADERS += texture/threaduploadtexture.h
        INCLUDEPATH += texture
    } else {
        message("threaduploadtexture ......: no")
    }

    mactexture:{
        message("mactexture ...............: yes")
        DEFINES += CUSTOMCONTEXT_MACTEXTURE
        SOURCES += texture/mactexture.cpp
        HEADERS += texture/mactexture.h
        INCLUDEPATH += texture
    } else {
        message("mactexture ...............: no")
    }

    nonpreservedtexture:{
        message("nonpreservedtexture ......: yes")
        DEFINES += CUSTOMCONTEXT_NONPRESERVEDTEXTURE
        SOURCES += texture/nonpreservedtexture.cpp
        HEADERS += texture/nonpreservedtexture.h
        INCLUDEPATH += texture
    } else {
        message("nonpreservedtexture ......: no")
    }
}


############################################################
#
# Animation Drivers
#

animationdriver:{
    message("animationdriver ..........: yes")
    DEFINES += CUSTOMCONTEXT_ANIMATIONDRIVER
    SOURCES += animation/animationdriver.cpp
    HEADERS += animation/animationdriver.h
} else {
    message("animationdriver ..........: no")
}

swaplistenanimationdriver:{
    message("swaplistenanimationdriver : yes")
    DEFINES += CUSTOMCONTEXT_SWAPLISTENINGANIMATIONDRIVER
    SOURCES += animation/swaplisteninganimationdriver.cpp
    HEADERS += animation/swaplisteninganimationdriver.h
} else {
    message("swaplistenanimationdriver : no")
}



############################################################
#
# Renderers
#

!customcontext_qt520:{
    overlaprenderer:{
        message("overlaprenderer ..........: yes")
        DEFINES += CUSTOMCONTEXT_OVERLAPRENDERER
        SOURCES += renderer/overlaprenderer.cpp
        HEADERS += renderer/overlaprenderer.h
    } else {
        message("overlaprenderer ..........: no")
    }
}



############################################################
#
# Other stuff
#

!customcontext_qt520:{
    materialpreload:{
        message("materialpreload ..........: yes")
        DEFINES += CUSTOMCONTEXT_MATERIALPRELOAD
    } else {
        message("materialpreload ..........: no")
    }

    nodfglyphs:{
        message("nodfglyphs ...............: yes")
        DEFINES += CUSTOMCONTEXT_NO_DFGLYPHS
    } else {
        message("nodfglyphs ...............: no")
    }

    msaa:{
        message("msaa .....................: yes")
        DEFINES += CUSTOMCONTEXT_MSAA
    } else {
        message("msaa .....................: no")
    }
}



surfaceformat:{
    message("surfaceformat ............: yes")
    DEFINES += CUSTOMCONTEXT_SURFACEFORMAT
} else {
    message("surfaceformat ............: no")
}


message("");
message("Enable the above features by adding them to the qmake config, for instance:")
message(" > qmake \"CONFIG+=verbose atlastexture dither\"");
message("");



SOURCES += \
    context.cpp \
    pluginmain.cpp

HEADERS += \
    context.h \
    pluginmain.h

OTHER_FILES += customcontext.json

target.path +=  $$[QT_INSTALL_PLUGINS]/scenegraph

files.path += $$[QT_INSTALL_PLUGINS]/scenegraph

INSTALLS += target files

!win*:DEFINES+=ENABLE_PROFILING

arm_build {
    DEFINES += USE_HALF_FLOAT
    QMAKE_CXXFLAGS += -mfp16-format=ieee -mfpu=neon
} else {
    DEFINES += DESKTOP_BUILD
}