-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.qmake.conf
55 lines (43 loc) · 1.53 KB
/
.qmake.conf
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
CONFIG += c++17 link_prl warn_on
PROJECT_IMPORTS_DIR = $$shadowed(imports)
PROJECT_LIBRARY_DIR = $$shadowed(lib)
defineReplace(sharedLibraryPath) {
return($$PROJECT_LIBRARY_DIR/$${QMAKE_PREFIX_SHLIB}$${1}.$${QMAKE_EXTENSION_SHLIB})
}
defineTest(linkSharedLibrary) {
target = $$1
android: target = $${target}_$${QT_ARCH}
PRE_TARGETDEPS *= $$sharedLibraryPath($$target)
LIBS *= -L$$PROJECT_LIBRARY_DIR -l$$target
export(PRE_TARGETDEPS)
export(LIBS)
}
defineReplace(staticLibraryPath) {
return($$PROJECT_LIBRARY_DIR/$${QMAKE_PREFIX_STATICLIB}$${1}.$${QMAKE_EXTENSION_STATICLIB})
}
defineTest(linkStaticLibrary) {
target = $$1
android: target = $${target}_$${QT_ARCH}
PRE_TARGETDEPS *= $$staticLibraryPath($$target)
LIBS *= -L$$PROJECT_LIBRARY_DIR -l$$target
export(PRE_TARGETDEPS)
export(LIBS)
}
defineTest(buildQmlPlugin) {
MODULE_URI = $$1
MODULE_VERSION = $$2
DESTDIR = $$PROJECT_IMPORTS_DIR/$$replace(MODULE_URI, \., /)
export(DESTDIR)
QMAKE_MOC_OPTIONS += -Muri=$$MODULE_URI
export(QMAKE_MOC_OPTIONS)
QMAKE_POST_LINK += $$QMAKE_COPY_FILE $$system_path($$PWD/qmldir) $$system_path($$DESTDIR)$$escape_expand(\\n\\t)
!cross_compile:!windows {
qtPrepareTool(QMLPLUGINDUMP, qmlplugindump)
QMAKE_POST_LINK += \
QML_DISABLE_DISK_CACHE=1 \
$$QMLPLUGINDUMP -output $$DESTDIR/$${TARGET}.qmltypes \
$$MODULE_URI $$MODULE_VERSION $$PROJECT_IMPORTS_DIR \
$$escape_expand(\\n\\t)
}
export(QMAKE_POST_LINK)
}