Skip to content

Instantly share code, notes, and snippets.

@torarnv
Created September 20, 2019 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torarnv/8c4f144f30c4bfb59c7ddbf85f6ffd3d to your computer and use it in GitHub Desktop.
Save torarnv/8c4f144f30c4bfb59c7ddbf85f6ffd3d to your computer and use it in GitHub Desktop.
diff --git i/mkspecs/features/mac/default_post.prf w/mkspecs/features/mac/default_post.prf
index 993f4d56a9..904cdfb9d9 100644
--- i/mkspecs/features/mac/default_post.prf
+++ w/mkspecs/features/mac/default_post.prf
@@ -106,12 +106,17 @@ macx-xcode {
VER_PAT = $$member(l, 2, 2)
unset(l)
+ # The CFBundleVersion should be of the form x.y.x with an optional
+ # suffix, eg. 1.0.0a3, version 1.0.0 alpha 3, so we include the whole
+ # VERSION.
qmake_full_version.name = QMAKE_FULL_VERSION
- qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+ qmake_full_version.value = $$bundle_version
QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
+ # The CFBundleShortVersionString is the user-visible string for the
+ # version, in the form x.y.z.
qmake_short_version.name = QMAKE_SHORT_VERSION
- qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
+ qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment