summaryrefslogtreecommitdiffstats
path: root/src/shadertools/shadertools.pro
blob: f213e1463ab46d51a5a15128b793addb35c7031e (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
TARGET = QtShaderTools

QT += gui-private

DEFINES += QT_BUILD_SHADERTOOLS_LIB

HEADERS += \
    $$PWD/qtshadertoolsglobal.h \
    $$PWD/qshaderbaker.h \
    $$PWD/qspirvshader_p.h \
    $$PWD/qspirvshaderremap_p.h \
    $$PWD/qspirvcompiler_p.h \
    $$PWD/qshaderbatchablerewriter_p.h

SOURCES += \
    $$PWD/qshaderbaker.cpp \
    $$PWD/qspirvshader.cpp \
    $$PWD/qspirvshaderremap.cpp \
    $$PWD/qspirvcompiler.cpp \
    $$PWD/qshaderbatchablerewriter.cpp

INCLUDEPATH += $$PWD/../3rdparty/SPIRV-Cross $$PWD/../3rdparty/glslang

# Exceptions must be enabled since that is the only sane way to get errors reported from SPIRV-Cross.
# They will not propagate outside of this module though so should be safe enough.
CONFIG += exceptions

!exists($$[QT_HOST_DATA]/.qmake.cache) {
    LIBLOC = $$shadowed($$dirname(_QMAKE_CONF_))/lib
} else {
    LIBLOC = $$[QT_HOST_LIBS]
}

STATICLIBS = qtspirv-cross qtglslang-glslang qtglslang-spirv qtglslang-osdependent qtglslang-oglcompiler # qtglslang-hlsl
for(libname, STATICLIBS) {
    staticlib = $$LIBLOC/$${QMAKE_PREFIX_STATICLIB}$$qtLibraryTarget($$libname).$${QMAKE_EXTENSION_STATICLIB}
    LIBS_PRIVATE += $$staticlib
    PRE_TARGETDEPS += $$staticlib
}

include($$PWD/doc/doc.pri)

load(qt_module)