diff options
author | Patric Stout <truebrain@openttd.org> | 2019-04-07 12:00:36 +0200 |
---|---|---|
committer | glx22 <glx22@users.noreply.github.com> | 2020-06-05 19:36:05 +0200 |
commit | b7643b1d36cb41eb6712042761c13b9819fcbe74 (patch) | |
tree | 3bb422ed83832cf197692aef82f142a187a28af6 /CPackProperties.cmake.in | |
parent | 56d54cf60eb5814f77dfcce91cf12879f01e1d1b (diff) | |
download | openttd-b7643b1d36cb41eb6712042761c13b9819fcbe74.tar.xz |
Add: create bundles via CPack
CPack works closely together with CMake to do the right thing in
terms of bundling (called 'package'). This generates all the
packaging we need, and some more.
Diffstat (limited to 'CPackProperties.cmake.in')
-rw-r--r-- | CPackProperties.cmake.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CPackProperties.cmake.in b/CPackProperties.cmake.in new file mode 100644 index 000000000..824c50f93 --- /dev/null +++ b/CPackProperties.cmake.in @@ -0,0 +1,12 @@ +# Make the current version available to CPack +set(CPACK_PACKAGE_VERSION "@REV_VERSION@") + +# Name the output file with the correct version +string(REPLACE "#CPACK_PACKAGE_VERSION#" "@REV_VERSION@" CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}") + +if (CPACK_BUNDLE_PLIST_SOURCE) + # Rewrite the Info.plist.in to contain the correct version + file(READ ${CPACK_BUNDLE_PLIST_SOURCE} INFO_PLIST_CONTENT) + string(REPLACE "#CPACK_PACKAGE_VERSION#" "@REV_VERSION@" INFO_PLIST_CONTENT "${INFO_PLIST_CONTENT}") + file(WRITE ${CPACK_BUNDLE_PLIST} "${INFO_PLIST_CONTENT}") +endif (CPACK_BUNDLE_PLIST_SOURCE) |