summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/default_pre.prf
blob: 86ad9eb7645c5487bf4b299949c24163a2f7eddf (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
load(exclusive_builds)
### Qt 5: remove "uic" and "resources" - or add "qt"
CONFIG = lex yacc warn_on debug uic resources $$CONFIG

exists($$_PRO_FILE_PWD_/sync.profile) {
    PRO_BASENAME = $$basename(_PRO_FILE_)

    # Try to detect proper QTDIR path. We require QTDIR, as syncqt uses that to create qt_module.pri
    # forwarding files. If we don't find QTDIR, we avoid creating the fwd files, since you then need
    # to do a 'make install;' before you can use the module
    # (ie. we don't use QT_INSTALL_DATA for fwd includes. This path needs a full copy)
    isEmpty(QTDIR) {
        QTDIR = $$(QTDIR)
        isEmpty(QTDIR):QTDIR = $$QT_BUILD_TREE
    }

    QTFWD =
    isEmpty(QTDIR) {
        QTFWD += -module-fwd $$OUT_PWD/module-paths/modules -cache-module-fwd
    } else {
        QTFWD += -qtdir $$QTDIR -module-fwd $$QTDIR/mkspecs/modules -developer-build
    }

    message("Running syncqt for $$PRO_BASENAME in $$OUT_PWD")
    qtPrepareTool(QMAKE_SYNCQT, syncqt)
    system("$$QMAKE_SYNCQT $$QTFWD -outdir $$OUT_PWD $$_PRO_FILE_PWD_") {
        # success! Nothing to do
    } else {
        error("Failed to run: $$QMAKE_SYNCQT $$QTFWD -outdir $$OUT_PWD $$_PRO_FILE_PWD_")
    }
    unset(QTFWD)
    unset(PRO_BASENAME)
}