mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-13 07:10:57 +00:00
b7643b1d36
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.
13 lines
608 B
CMake
13 lines
608 B
CMake
# 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)
|