Files
hdf5/config/toolchain/mingw-w64-x86-64-wine.sh
T
Julien Schueller d58638be09 CMake: Fix Fortran cross-compilation support
Refactor the cross-compilation infrastructure to rely on the standard
CMAKE_CROSSCOMPILING_EMULATOR variable instead of the custom
CROSSCOMPILING_PATH environment hack.

Key changes:
- Removed `ENVIRONMENT "${CROSSCOMPILING_PATH}"` from all test definitions.
- Updated custom commands (e.g., H5match_types, H5_gen) to invoke the
  emulator explicitly when cross-compiling.
- Updated ConfigureChecks.cmake and HDF5UseFortran.cmake to enable
  `try_run` checks when an emulator is defined.
- Added config/toolchain/mingw-w64-x86-64-wine.sh wrapper to automatically
  locate MinGW runtime libraries (like libgfortran) for Wine execution.
- Cleaned up toolchain files to remove hardcoded emulator paths, deferring
  configuration to the build environment.
2026-02-13 14:45:02 -06:00

12 lines
335 B
Bash
Executable File

#!/bin/sh
set -e
# assume gfortran-mingw-w64-x86-64-win32 is installed
mingw_prefix=${TOOLCHAIN_PREFIX:-x86_64-w64-mingw32}
libgfortran_path=`ls /usr/lib/gcc/${mingw_prefix}/*/libgfortran.dll.a 2>/dev/null | head -1`
if test -n "${libgfortran_path}"; then
export WINEPATH=`dirname ${libgfortran_path}`
fi
/usr/lib/wine/wine64 "$@"