-
Notifications
You must be signed in to change notification settings - Fork 38
/
libcommuni.pro
121 lines (102 loc) · 3.6 KB
/
libcommuni.pro
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
######################################################################
# Communi
######################################################################
TEMPLATE = subdirs
SUBDIRS += src
CONFIG += ordered
!no_tests {
SUBDIRS += tests
} else {
message(Tests disabled)
}
!no_examples {
SUBDIRS += examples
} else {
message(Examples disabled)
}
lessThan(QT_MAJOR_VERSION, 5) {
lessThan(QT_MAJOR_VERSION, 4) | lessThan(QT_MINOR_VERSION, 6) {
error(Communi requires Qt 4.6 or newer but Qt $$[QT_VERSION] was detected.)
}
defineTest(write_file) {
first = true
for(line, $$2) {
!isEmpty(first):system(echo $$line > $$1)
else:system(echo $$line >> $$1)
first =
}
return(true)
}
}
static:CONFIG_LINES += "DEFINES+=IRC_STATIC"
else:CONFIG_LINES += "DEFINES+=IRC_SHARED"
include(version.pri)
IRC_VERSION_MAJOR = $$section(IRC_VERSION, ., 0, 0)
IRC_VERSION_MINOR = $$section(IRC_VERSION, ., 1, 1)
IRC_VERSION_PATCH = $$section(IRC_VERSION, ., 2, 2)
CONFIG_LINES += "IRC_VERSION=$$IRC_VERSION"
CONFIG_LINES += "IRC_VERSION_MAJOR=$$IRC_VERSION_MAJOR"
CONFIG_LINES += "IRC_VERSION_MINOR=$$IRC_VERSION_MINOR"
CONFIG_LINES += "IRC_VERSION_PATCH=$$IRC_VERSION_PATCH"
isEmpty(IRC_INSTALL_LIBS):IRC_INSTALL_LIBS = $$[QT_INSTALL_LIBS]
isEmpty(IRC_INSTALL_BINS):IRC_INSTALL_BINS = $$[QT_INSTALL_BINS]
isEmpty(IRC_INSTALL_HEADERS):IRC_INSTALL_HEADERS = $$[QT_INSTALL_HEADERS]/Communi
isEmpty(IRC_INSTALL_FEATURES) {
isEqual(QT_MAJOR_VERSION, 5):IRC_INSTALL_FEATURES = $$[QT_HOST_DATA]/mkspecs/features
else:IRC_INSTALL_FEATURES = $$[QMAKE_MKSPECS]/features
}
# qt4/win: WARNING: Unescaped backslashes are deprecated
!win32|greaterThan(QT_MAJOR_VERSION, 4) {
CONFIG_LINES += "IRC_INSTALL_LIBS=$$IRC_INSTALL_LIBS"
CONFIG_LINES += "IRC_INSTALL_BINS=$$IRC_INSTALL_BINS"
CONFIG_LINES += "IRC_INSTALL_HEADERS=$$IRC_INSTALL_HEADERS"
CONFIG_LINES += "IRC_INSTALL_FEATURES=$$IRC_INSTALL_FEATURES"
}
IRC_CONFIG = $${OUT_PWD}$${QMAKE_DIR_SEP}communi-config.prf
write_file($$IRC_CONFIG, CONFIG_LINES)
CONFIG_VARS = $${OUT_PWD}$${QMAKE_DIR_SEP}.config.vars
exists($$CONFIG_VARS) {
CONFIG_LINES += "include\\\($$CONFIG_VARS\\\)"
}
QMAKE_CACHE = $${OUT_PWD}$${QMAKE_DIR_SEP}.qmake.cache
write_file($$QMAKE_CACHE, CONFIG_LINES)
OTHER_FILES += .gitignore
OTHER_FILES += .github/workflows/ci.yml
OTHER_FILES += AUTHORS
OTHER_FILES += CHANGELOG.md
OTHER_FILES += configure
OTHER_FILES += Doxyfile
OTHER_FILES += INSTALL
OTHER_FILES += LICENSE
OTHER_FILES += README.md
OTHER_FILES += features/communi.prf
include(doc/doc.pri)
features.files += features/communi.prf
features.files += $$OUT_PWD/communi-config.prf
features.path = $$IRC_INSTALL_FEATURES
INSTALLS += features
!build_pass {
macx {
!qt_no_framework {
message(Building Communi $$IRC_VERSION (framework))
} else {
message(Building Communi $$IRC_VERSION (dylib))
}
} else {
message(Building Communi $$IRC_VERSION)
}
}
coverage {
cov_zerocounters.CONFIG += recursive
cov_zerocounters.recurse = src
QMAKE_EXTRA_TARGETS += cov_zerocounters
cov_capture.CONFIG += recursive
cov_capture.recurse = src
QMAKE_EXTRA_TARGETS += cov_capture
cov_genhtml.CONFIG += recursive
cov_genhtml.recurse = src
QMAKE_EXTRA_TARGETS += cov_genhtml
coverage.depends += first cov_zerocounters check cov_capture cov_genhtml
QMAKE_EXTRA_TARGETS += coverage
!build_pass:message(Code coverage collection enabled)
}