-
Notifications
You must be signed in to change notification settings - Fork 0
/
linuxdeployqt.pro
55 lines (40 loc) · 1.87 KB
/
linuxdeployqt.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
option(host_build)
QT = core
CONFIG += console
TARGET = linuxdeployqt
VERSION = $$MODULE_VERSION
DEFINES += BUILD_LINUXDEPLOYQT
load(qt_tool)
HEADERS += shared.h
SOURCES += main.cpp \
shared.cpp
OTHER_FILES += .qmake.conf
DEFINES -= QT_USE_QSTRINGBUILDER #leads to compile errors if not disabled
# versioning
# don't break the quotes -- at the moment, the shell commands are injected into the Makefile to have them run on every
# build and not during configure time
_LINUXDEPLOYQT_GIT_COMMIT = "$$system("cd $$PWD && git rev-parse --short HEAD")"
message( "LINUXDEPLOYQT_GIT_COMMIT = " $$_LINUXDEPLOYQT_GIT_COMMIT )
DEFINES += LINUXDEPLOYQT_GIT_COMMIT="'\"$(shell cd $$PWD && git rev-parse --short HEAD)\"'"
# DEFINES += LINUXDEPLOYQT_GIT_COMMIT="'\"$$_LINUXDEPLOYQT_GIT_COMMIT\"'"
DEFINES += BUILD_DATE="'\"$(shell env LC_ALL=C date -u '+%Y-%m-%d %H:%M:%S %Z')\"'"
_BUILD_NUMBER = $$(TRAVIS_BUILD_NUMBER)
isEmpty(_BUILD_NUMBER) {
message("Not building on Travis CI, tagging build as local dev build")
DEFINES += BUILD_NUMBER="'\"<local dev build>\"'"
} else {
message("Building on Travis CI build, build number $$_BUILD_NUMBER")
DEFINES += BUILD_NUMBER="'\"$$_BUILD_NUMBER\"'"
}
DEFINES += LINUXDEPLOYQT_VERSION="'\"$(shell cd $$PWD && git describe --tags $(shell cd $$PWD && git rev-list --tags --skip=1 --max-count=1) --abbrev=0)\"'"
contains(DEFINES, EXCLUDELIST.*) {
message("EXCLUDELIST specified, to use the most recent exclude list, please run qmake without EXCLUDELIST definition and with internet.")
} else {
message("Updating exclude list...")
# check whether command _would_ run successfully
EXCLUDELIST_GENERATION_WORKS = FALSE
system($$_PRO_FILE_PWD_/../generate-excludelist.sh): EXCLUDELIST_GENERATION_WORKS = TRUE
isEqual(EXCLUDELIST_GENERATION_WORKS, FALSE) {
warning("Updating excludelist failed, using outdated copy")
}
}