-
Notifications
You must be signed in to change notification settings - Fork 0
/
easy_qr.pro
50 lines (50 loc) · 1.67 KB
/
easy_qr.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
QT += core gui widgets
QMAKE_CXXFLAGS += /
utf-8
OUT_PWD = $$PWD
win32:contains(QMAKE_HOST.arch, x86_64) {
QTDIR = C:/Qt/Qt5.12.11/5.12.11/mingw73_64
DESTDIR = $$shell_path($$PWD/64)
} else {
QTDIR = C:/Qt/Qt5.12.11/5.12.11/mingw73_32
DESTDIR = $$shell_path($$PWD/32)
QMAKE_CXXFLAGS += -m32
}
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
widget.cpp
HEADERS += \
widget.h
FORMS += \
widget.ui
RESOURCES += \
myres.qrc
RC_ICONS = files/qr.ico
RC_FILE += files/rc.rc
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
static {
CONFIG+= static
CONFIG += staticlib
DEFINES+= STATIC
message("____static mode____")
mac: TARGET = $$join(TARGET,,,_static)
win32: TARGET = $$join(TARGET,,,_static)
}
extralib.target = extra
win32:contains(QMAKE_HOST.arch, x86_64) {
message("windows [64]")
extralib.commands = cd go_src && set CGO_ENABLED=1& go mod tidy & set GOOS=windows& set GOARCH=amd64& go build -o ../files/qrcode.dll -buildmode=c-shared -ldflags \"-s -w\" & set CGO_ENABLED=0;
} else {
message("windows [32]")
extralib.commands = cd go_src && set CGO_ENABLED=1& go mod tidy & set GOOS=windows& set GOARCH=386& go build -o ../files/qrcode.dll -buildmode=c-shared -ldflags \"-s -w\" & set CGO_ENABLED=0;
}
extralib.depends =
QMAKE_EXTRA_TARGETS += extralib
PRE_TARGETDEPS = extra
QMAKE_POST_LINK += $$QTDIR/bin/windeployqt.exe --release --force $$shell_path($$DESTDIR/$${TARGET}.exe)