mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
c669401767
The basic idea is we create a version header template at "src/base/version.h.in" and the build systems are expected to replace strings that are enclosed with @ symbols and generate "src/base/version.h" for other source files to consume/include.
28 lines
958 B
Plaintext
28 lines
958 B
Plaintext
# keep it all lowercase to match program naming convention on *nix systems
|
|
PROJECT_NAME = qbittorrent
|
|
|
|
# Define version numbers here
|
|
VER_MAJOR = 4
|
|
VER_MINOR = 4
|
|
VER_BUGFIX = 0
|
|
VER_BUILD = 0
|
|
VER_STATUS = alpha1 # Should be empty for stable releases!
|
|
|
|
# Don't touch the rest part
|
|
PROJECT_VERSION = $${VER_MAJOR}.$${VER_MINOR}.$${VER_BUGFIX}
|
|
|
|
!equals(VER_BUILD, 0) {
|
|
PROJECT_VERSION = $${PROJECT_VERSION}.$${VER_BUILD}
|
|
}
|
|
|
|
PROJECT_VERSION = $${PROJECT_VERSION}$${VER_STATUS}
|
|
|
|
# Generate version header
|
|
versionHeader = $$cat(src/base/version.h.in, blob)
|
|
versionHeader = $$replace(versionHeader, "@VER_MAJOR@", $$VER_MAJOR)
|
|
versionHeader = $$replace(versionHeader, "@VER_MINOR@", $$VER_MINOR)
|
|
versionHeader = $$replace(versionHeader, "@VER_BUGFIX@", $$VER_BUGFIX)
|
|
versionHeader = $$replace(versionHeader, "@VER_BUILD@", $$VER_BUILD)
|
|
versionHeader = $$replace(versionHeader, "@PROJECT_VERSION@", $$PROJECT_VERSION)
|
|
write_file(src/base/version.h, versionHeader)
|