add meta-data json file
This commit is contained in:
parent
ed8505c177
commit
078dd94e60
@ -5,12 +5,8 @@ QT += serialport
|
|||||||
|
|
||||||
|
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_
|
INCLUDEPATH+=$$_PRO_FILE_PWD_
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/support
|
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/plugins
|
INCLUDEPATH+=$$_PRO_FILE_PWD_/plugins
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/include
|
INCLUDEPATH+=$$_PRO_FILE_PWD_/include
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/HMI
|
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/HMI/screens
|
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/HMI/support
|
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/src
|
INCLUDEPATH+=$$_PRO_FILE_PWD_/src
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/src/ATBAPP
|
INCLUDEPATH+=$$_PRO_FILE_PWD_/src/ATBAPP
|
||||||
INCLUDEPATH+=$$_PRO_FILE_PWD_/src/ATBAPP/support
|
INCLUDEPATH+=$$_PRO_FILE_PWD_/src/ATBAPP/support
|
||||||
@ -21,12 +17,11 @@ QMAKE_CXXFLAGS += -Wno-deprecated-copy -O
|
|||||||
# default
|
# default
|
||||||
ARCH = PTU5
|
ARCH = PTU5
|
||||||
|
|
||||||
DEFINES+=ATB_QT_VERSION=\\\"5.11\\\"
|
|
||||||
|
|
||||||
contains( CONFIG, DesktopLinux ) {
|
contains( CONFIG, DesktopLinux ) {
|
||||||
QMAKE_CC = ccache $$QMAKE_CC
|
QMAKE_CC = ccache $$QMAKE_CC
|
||||||
QMAKE_CXX = ccache $$QMAKE_CXX
|
QMAKE_CXX = ccache $$QMAKE_CXX
|
||||||
QMAKE_CXXFLAGS += -std=c++11
|
QMAKE_CXXFLAGS += -std=c++17
|
||||||
# QMAKE_CXXFLAGS += -Wno-deprecated-ctor
|
# QMAKE_CXXFLAGS += -Wno-deprecated-ctor
|
||||||
linux-clang { QMAKE_CXXFLAGS += -Qunused-arguments }
|
linux-clang { QMAKE_CXXFLAGS += -Qunused-arguments }
|
||||||
ARCH = DesktopLinux
|
ARCH = DesktopLinux
|
||||||
@ -35,7 +30,7 @@ contains( CONFIG, DesktopLinux ) {
|
|||||||
contains( CONFIG, PTU5 ) {
|
contains( CONFIG, PTU5 ) {
|
||||||
# QMAKE_CC = ccache $$QMAKE_CC
|
# QMAKE_CC = ccache $$QMAKE_CC
|
||||||
# QMAKE_CXX = ccache $$QMAKE_CXX
|
# QMAKE_CXX = ccache $$QMAKE_CXX
|
||||||
QMAKE_CXXFLAGS += -std=c++11
|
QMAKE_CXXFLAGS += -std=c++17
|
||||||
linux-clang { QMAKE_CXXFLAGS += -Qunused-arguments }
|
linux-clang { QMAKE_CXXFLAGS += -Qunused-arguments }
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
ARCH = PTU5
|
ARCH = PTU5
|
||||||
@ -57,6 +52,27 @@ INTERFACE_DEFINITION = $${PWD}/src/ATBAPP/VMCInterface.h
|
|||||||
|
|
||||||
DEFINES += VMCPLUGIN_LIBRARY
|
DEFINES += VMCPLUGIN_LIBRARY
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
BUILD_DATE=$$system("date /t")
|
||||||
|
BUILD_TIME=$$system("time /t")
|
||||||
|
} else {
|
||||||
|
BUILD_DATE=$$system("date +%d-%m-%y")
|
||||||
|
BUILD_TIME=$$system("date +%H:%M:%S")
|
||||||
|
}
|
||||||
|
|
||||||
|
GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
|
||||||
|
|
||||||
|
EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
|
||||||
|
|
||||||
|
CONFIG += c++17
|
||||||
|
|
||||||
|
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
|
||||||
|
DEFINES+=ATB_QT_VERSION=\\\"$${QT_VERSION}\\\"
|
||||||
|
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
|
||||||
|
DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
|
||||||
|
DEFINES+=APP_EXTENDED_VERSION=\\\"$$EXTENDED_VERSION\\\"
|
||||||
|
|
||||||
|
|
||||||
# Default rules for deployment.
|
# Default rules for deployment.
|
||||||
#qnx: target.path = /tmp/$${TARGET}/bin
|
#qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
#else: unix:!android: target.path = /opt/$${TARGET}/bin
|
#else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
@ -83,16 +99,5 @@ SOURCES += \
|
|||||||
src/ATBAPP/support/VMC/vmc.cpp \
|
src/ATBAPP/support/VMC/vmc.cpp \
|
||||||
src/ATBAPP/support/VendingData.cpp
|
src/ATBAPP/support/VendingData.cpp
|
||||||
|
|
||||||
DISTFILES += \
|
OTHER_FILES += \
|
||||||
generate-version.sh
|
plugins/metadata.json
|
||||||
|
|
||||||
|
|
||||||
# Define how to create version.h
|
|
||||||
VERSION_H = $$PWD/include/version.h
|
|
||||||
version.output = $$PWD/include/version.h
|
|
||||||
version.commands = $$PWD/generate-version.sh $${ARCH} $${TARGET} $${INTERFACE} $${INTERFACE_DEFINITION} $${VERSION_H}
|
|
||||||
version.depends = FORCE
|
|
||||||
version.input = VERSION_H
|
|
||||||
version.variable_out = HEADERS
|
|
||||||
QMAKE_EXTRA_COMPILERS += version
|
|
||||||
QMAKE_CLEAN += $${PWD}/include/version.h
|
|
||||||
|
Loading…
Reference in New Issue
Block a user