forked from Blockstream/green_qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgreen.pro
152 lines (129 loc) · 4.48 KB
/
green.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
TARGET = Green
VERSION_MAJOR = 0
VERSION_MINOR = 0
VERSION_PATCH = 3
VERSION_PRERELEASE =
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}.$${VERSION_PATCH}
QMAKE_TARGET_COMPANY = Blockstream Corporation Inc.
QMAKE_TARGET_PRODUCT = Blockstream Green
QMAKE_TARGET_DESCRIPTION = Blockstream Green
QMAKE_TARGET_COPYRIGHT = Copyright 2020 Blockstream Corporation Inc. All rights reserved.
DEFINES += "VERSION_MAJOR=$$VERSION_MAJOR"\
"VERSION_MINOR=$$VERSION_MINOR"\
"VERSION_PATCH=$$VERSION_PATCH" \
"VERSION_PRERELEASE=\"$$VERSION_PRERELEASE\"" \
"VERSION=\"$${VERSION_MAJOR}.$${VERSION_MINOR}.$${VERSION_PATCH}\""
QML_IMPORT_NAME = Blockstream.Green
QML_IMPORT_MAJOR_VERSION = 0
QML_IMPORT_MINOR_VERSION = 1
QT += qml quick quickcontrols2 svg
CONFIG += c++11 metatypes qmltypes qtquickcompiler
CONFIG += qzxing_qml qzxing_multimedia enable_decoder_qr_code enable_encoder_qr_code
!defined(GDK_PATH, var): error(Run qmake with GDK_PATH set. See BUILD.md for more details.)
!defined(QZXING_PATH, var): error(Run qmake with QZXING_PATH set. See BUILD.md for more details.)
include($${QZXING_PATH}/src/QZXing-components.pri)
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Refer to the documentation for the
# deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
src/accountcontroller.cpp \
src/account.cpp \
src/asset.cpp \
src/balance.cpp \
src/clipboard.cpp \
src/controller.cpp \
src/createaccountcontroller.cpp \
src/device.cpp \
src/devicelistmodel.cpp \
src/devicemanager.cpp \
src/ga.cpp \
src/json.cpp \
src/main.cpp \
src/network.cpp \
src/networkmanager.cpp \
src/renameaccountcontroller.cpp \
src/restorecontroller.cpp \
src/sendtransactioncontroller.cpp \
src/settingscontroller.cpp \
src/signupcontroller.cpp \
src/transaction.cpp \
src/twofactorcontroller.cpp \
src/util.cpp \
src/wallet.cpp \
src/walletlistmodel.cpp \
src/walletmanager.cpp \
src/wally.cpp
HEADERS += \
src/accountcontroller.h \
src/account.h \
src/asset.h \
src/balance.h \
src/clipboard.h \
src/controller.h \
src/createaccountcontroller.h \
src/device.h \
src/devicelistmodel.h \
src/devicemanager.h \
src/ga.h \
src/json.h \
src/network.h \
src/networkmanager.h \
src/renameaccountcontroller.h \
src/restorecontroller.h \
src/sendtransactioncontroller.h \
src/settingscontroller.h \
src/signupcontroller.h \
src/transaction.h \
src/twofactorcontroller.h \
src/util.h \
src/wallet.h \
src/walletlistmodel.h \
src/walletmanager.h \
src/wally.h
RESOURCES += qml/qml.qrc
RESOURCES += assets/assets.qrc
win32 {
RESOURCES += src/win.qrc
} else {
RESOURCES += src/linux.qrc
}
CONFIG += lrelease embed_translations
EXTRA_TRANSLATIONS = $$files($$PWD/i18n/*.ts)
INCLUDEPATH += src/ $${GDK_PATH}
macos {
QMAKE_TARGET_BUNDLE_PREFIX = com.blockstream
LIBS += -framework Foundation -framework Cocoa
ICON = Green.icns
QMAKE_POST_LINK += \
plutil -replace CFBundleDisplayName -string \"Blockstream Green\" $$OUT_PWD/$${TARGET}.app/Contents/Info.plist && \
plutil -replace NSCameraUsageDescription -string \"We use the camera to scan QR codes\" $$OUT_PWD/$${TARGET}.app/Contents/Info.plist && \
plutil -remove NOTE $$OUT_PWD/$${TARGET}.app/Contents/Info.plist || true
static {
LIBS += $${GDK_PATH}/libgreenaddress_full.a
} else {
LIBS += -L$${GDK_PATH} -lgreenaddress
}
}
unix:!macos:!android {
static {
LIBS += $${GDK_PATH}/libgreenaddress_full.a
SOURCES += src/glibc_compat.cpp
LIBS += -Wl,--wrap=__divmoddi4 -Wl,--wrap=log2f
} else {
LIBS += -L$${GDK_PATH} -lgreenaddress
}
}
win32:static {
# FIXME: the following script appends -lwinpthread at the end so that green .rsrc entries are used instead
QMAKE_LINK=$${PWD}/link.sh
RC_ICONS = Green.ico
LIBS += $${GDK_PATH}/libgreenaddress_full.a
}
DISTFILES += \
src/qtquickcontrols2.conf