OpenTTD-patches/cmake/FindGrfcodec.cmake
Peter Nelson 872fdcbbab
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.
2023-11-26 15:59:41 +00:00

16 lines
375 B
CMake

# 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
)