I am trying to cross compile VTK through vcpkg on Ubuntu 20.04 for windows. I am using mingw through ubuntu repository as well as MXE. The compilation is failing due to hdf5 not able to successfully compile.
Note that cross-compiling VTK requires compiling the host tools separately (see the VTK_BUILD_COMPILE_TOOLS_ONLY option). Other than that, it may involve hard-coding some try_compile results (HDF5 is one perennial culprit of try_run as well). You might be able to get away by setting CMAKE_CROSSCOMPILING_EMULATOR to wine so that compiled things can be run “natively”.