[CMake] Cross-compilation on Linux targeting Windows

Clifford Yapp cliffyapp at gmail.com
Thu Apr 12 08:12:42 EDT 2012


Having done a little investigation into cross-compilation (after
blowing away my Windows partition more or less unintentionally) it
looks like our build is Not a Good Candidate - we do a truckload of
introspection, as well as using custom commands and targets based off
of binaries we build during compilation.

While this problem (executables generated for a different platform
during build testing) is of course not solvable in the general case,
on Linux there is actually a glimmer of hope that binaries built for
Windows *could* be run as part of the build process - i.e. using Wine
when running each binary that is an output of the current build
process.

Has anyone ever looked into this?  Would it be possible to have
TRY_RUN, execute_process and add_custom_command (plus any others I
missed) use wine "under the hood" to execute WIN32 compiled build
targets?

Cheers,
CY


More information about the CMake mailing list