Files @ r28179:c6b977d63ddb
Branch filter:

Location: cpp/openttd-patchpack/source/cmake/FindGrfcodec.cmake

Peter Nelson
Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. (#11492)

This allows for v2 container NewGRFs to be created. Hashes are needed for building the baseset metadata, so the .hash files are stored the source tree so they can be built if grfcodec and grfid are not present.

The hash of openttd.grf is not actually needed, but it is simpler to leave it in than handle only orig_extra.grf.
# Autodetect grfcodec and nforenum.
#

find_program(GRFCODEC_EXECUTABLE grfcodec)
find_program(GRFID_EXECUTABLE grfid)
find_program(NFORENUM_EXECUTABLE nforenum)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Grfcodec
    FOUND_VAR GRFCODEC_FOUND
    REQUIRED_VARS
        GRFCODEC_EXECUTABLE
        GRFID_EXECUTABLE
        NFORENUM_EXECUTABLE
)