Files @ r27440:a8ea984125b3
Branch filter:

Location: cpp/openttd-patchpack/source/CPackProperties.cmake.in

PeterN
Fix d9a04ba446: Ensure MD5Hash is initialized. (#10876)

Not all instances need to be initialized as often they are copied or
written to, but doing all ensures no surprises.

Move the ^= operator to MD5Hash while we're at it.
# 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)