-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathtelegram-qt.pro
91 lines (78 loc) · 1.91 KB
/
telegram-qt.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
include(options.pri)
message("QMake build is deprecated. Use CMake instead.")
# The macro is taken from QtCreator
defineTest(minQtVersion) {
maj = $$1
min = $$2
patch = $$3
isEqual(QT_MAJOR_VERSION, $$maj) {
isEqual(QT_MINOR_VERSION, $$min) {
isEqual(QT_PATCH_VERSION, $$patch) {
return(true)
}
greaterThan(QT_PATCH_VERSION, $$patch) {
return(true)
}
}
greaterThan(QT_MINOR_VERSION, $$min) {
return(true)
}
}
greaterThan(QT_MAJOR_VERSION, $$maj) {
return(true)
}
return(false)
}
!minQtVersion(5, 5, 0) {
message("Cannot build TelegramQt with Qt version $${QT_VERSION}.")
error("Use at least Qt 5.5.0.")
}
TEMPLATE = subdirs
SUBDIRS = TelegramQt
isEmpty(BUILD_ONLY_LIBRARY) {
BUILD_ONLY_LIBRARY = "false"
}
isEmpty(BUILD_WIDGETS_CLIENT) {
equals(BUILD_ONLY_LIBRARY, "true") {
BUILD_WIDGETS_CLIENT = "false"
} else {
BUILD_WIDGETS_CLIENT = "true"
}
}
isEmpty(BUILD_QML_CLIENT) {
BUILD_QML_CLIENT = "false"
}
isEmpty(BUILD_QML_IMPORT) {
BUILD_QML_IMPORT = "true"
}
equals(BUILD_QML_IMPORT, "true") {
SUBDIRS += imports/TelegramQt/TelegramQtQml.pro
}
equals(BUILD_QCH, "true") {
include(doc/doc.pri)
}
#equals(BUILD_WIDGETS_CLIENT, "true") {
# SUBDIRS += clients/widgets
# CONFIG += ordered
#}
equals(BUILD_QML_IMPORT, "true") {
SUBDIRS += clients/qml-client
CONFIG += ordered
}
contains(options, developer-build) {
SUBDIRS += tests
SUBDIRS += TelegramQt/tests
minQtVersion(5, 6, 0) {
SUBDIRS += generator
SUBDIRS += generator/tests
} else {
message("Use Qt 5.6.0 or higher to build GeneratorNG")
}
}
contains(options, server) {
SUBDIRS += server
}
OTHER_FILES += CMakeLists.txt
OTHER_FILES += README.md
OTHER_FILES += .travis.yml
OTHER_FILES += rpm/telegram-qt.spec