<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm trying to get cross compilation of a simple library working to build a windows library on a linux box using the visual studio compilers. So far the farthest I've gotten is with:<div><br><div>./cmake-2.8.9-Linux-i386/bin/cmake ../rmf -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=/usr/bin/cl -DCMAKE_CXX_COMPILER=/usr/bin/w32cc -DCMAKE_RC_COMPILER=/bin/true</div><div><br></div><div>You can find the cmake output at &lt;<a href="https://gist.github.com/3897173">https://gist.github.com/3897173</a>&gt;. Basically, it seems to partly figure out the compilers, but then tries to test cl by passing the source file using "-c" and a unix path, both of which cl drops on the floor. The command is</div><div><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 12px; line-height: 1.4em; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; text-align: left; "><div class="line" id="LC33" style="margin: 0px; padding: 0px 0px 0px 1em; line-height: 1.4em; ">&nbsp;/usr/bin/cl /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi /Ob0</div><div class="line" id="LC34" style="margin: 0px; padding: 0px 0px 0px 1em; line-height: 1.4em; ">&nbsp;&nbsp;/Od /RTC1 /FoCMakeFiles/cmTryCompileExec3161846472.dir/testCCompiler.c.obj</div><div class="line" id="LC35" style="margin: 0px; padding: 0px 0px 0px 1em; line-height: 1.4em; ">&nbsp;&nbsp;/Fd/synth1/home/drussel/rmf-build/CMakeFiles/CMakeTmp/cmTryCompileExec3161846472.pdb</div><div class="line" id="LC36" style="margin: 0px; padding: 0px 0px 0px 1em; line-height: 1.4em; ">&nbsp;&nbsp;-c /synth1/home/drussel/rmf-build/CMakeFiles/CMakeTmp/testCCompiler.c</div></pre><div><br></div></div><div>This is using the build of cmake 2.8.9 for linux i386 downloaded from the kitware site.</div><div><br></div><div>The RC compiler bit is a suggestion I found while searching around as cmake demanded an RC compiler, which I don't think will get used. But better suggestions are welcome.&nbsp;</div><div><br></div><div>Thanks for any suggestions.</div></div><div>&nbsp; &nbsp; &nbsp; &nbsp; --Daniel</div></body></html>