Convert C++ version string to be define instead of include
This allows Qmake to use the version number as well as not requiring all other uses of the version string to strip double quotes from it. This also reduces the fragility of the version string as it was required to be a valid C++ char*, even in contexts where that wouldn't matter.
This commit is contained in:
@@ -3,6 +3,9 @@ CONFIG += c++1z
|
||||
|
||||
DEFINES += ELPP_THREAD_SAFE ELPP_QT_LOGGING ELPP_NO_DEFAULT_LOG_FILE
|
||||
|
||||
VERSION = "$$cat($$PWD/build_scripts/compile_version_string.txt)"
|
||||
DEFINES += APPLICATION_VERSION=\\\"$$VERSION\\\"
|
||||
|
||||
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5.12 or higher")
|
||||
lessThan(QT_MINOR_VERSION, 12): error("requires Qt 5.12 or higher")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user