summaryrefslogtreecommitdiffstats
path: root/common.pri
blob: 29b396d1abbb985382a9078691d13794e919cc1d (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
CONFIG(debug,debug|release) {
    DEFINES += QMF_ENABLE_LOGGING
}


win32 | macx {

    RELEASEMODE=unspecified

    !build_pass {

        win32 {
            contains(CONFIG_WIN,debug) {
                RELEASEMODE=debug
            } else:contains(CONFIG_WIN,release) {
                RELEASEMODE=release
            }
        }

        # In Windows we want to build libraries in debug and release mode if the user
        # didn't select a version, and if Qt is built in debug_and_release.
        # This avoids problems for third parties as qmake builds debug mode by default
        # Silently disable unsupported configurations

        # MacOSX always builds debug and release libs when using mac framework

        CONFIG -= debug release debug_and_release build_all

        contains(RELEASEMODE,unspecified) {
            contains(QT_CONFIG,debug):contains(QT_CONFIG,release) | if(macx:contains(QT_CONFIG,qt_framework):contains(TEMPLATE,.*lib)) {
                CONFIG += debug_and_release build_all
            } else {
                contains(QT_CONFIG,debug): CONFIG+=debug
                contains(QT_CONFIG,release): CONFIG+=release
            }
        } else {
            CONFIG += $$RELEASEMODE
        }
    }

    

    #suffix changes

    contains(TEMPLATE,.*lib) {
        TARGET=$$qtLibraryTarget($${TARGET})
    } 

    win32 {
        contains(TEMPLATE,.*app) {
            CONFIG(debug,debug|release):TARGET=$$join(TARGET,,,d)
        }

        # If we are building both debug and release configuration, ensure
        # debug binaries load debug versions of their dependents

        CONFIG(debug,debug|release) {
            DEFINES += LOAD_DEBUG_VERSION
        }
    }

}

INSTALLS += target

DESTDIR=build

plugin {
    DEFINES += PLUGIN_INTERNAL
}

# build QMF libraries as frameworks on OSX, omitting plugins.

mac:contains(QT_CONFIG,qt_framework):!plugin {
    CONFIG += lib_bundle absolute_library_soname
    FRAMEWORK_HEADERS.version = Versions
    FRAMEWORK_HEADERS.files = $${PUBLIC_HEADERS}
    FRAMEWORK_HEADERS.path = Headers
    QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
}

qmfclient:qtAddLibrary(qmfclient)
qmfmessageserver:qtAddLibrary(qmfmessageserver)
qmfutil:qtAddLibrary(qmfutil)