[CMake] Visual Studio Cross Compile
Michael Jaentsch
michael.jaentsch at in.tum.de
Thu Oct 29 10:21:41 EDT 2015
Hi all,
I have a question concerning Cross Compiling with CMake on Windows. I
would like to use Visual Studio but this is not a must. What I do is, I
setup a project for Cross Compiling on Linux and it works fine. Now I
want to transfer to Windows, so I set up a toolchain file which sets the
following variables:
CMAKE_SYSTEM_NAME
CMAKE_SYSTEM_PROCESSOR
CMAKE_FIND_ROOT_PATH
CMAKE_C_COMPILER
CMAKE_CXX_COMPILER
and some more stuff. Then I run my cmake gui (I tried 3.2 and 3.4rc2)
on Windows and tell it to generate a project for Visual Studio 10 and to
use the toolchain file. However, the output shows that it is trying to
use the Visual Studio compiler and then subsequently the build fails
because of some unkown compiler flags.
So my question is: Is it even possible to do what I'm trying to do? Can
I cross compile with Visual Studio or do I have to use a different
generator? All I found in the documentation is that it is possible to
cross compile with a toolchain file...
Cheers
Michael
--
Technische Universität München
Michael Jäntsch
Fakultät für Informatik
Robotics and Embedded Systems
Parkring 13
85748 Garching bei München
michael.jaentsch at in.tum.de
www6.in.tum.de
More information about the CMake
mailing list