2006/8/29, Brad King <[EMAIL PROTECTED]>:
Eric Noulard wrote: > Let's say I want to cross-compile my Windows application/library > on my Linux box using a cross-gcc (like mingw)? >
[...]
You can try editing the Modules/Platform files to adjust the prefixes and extensions used when computing library names. Then you just need to setup the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS variables correctly and make sure the project doesn't do any TRY_RUNs. You can specify the actual compiler by setting the CC and CXX environment variables before running CMake the first time in a new build tree.
I will give a try by setting up some CMAKE_xxxx env var properly. However could you tell me HOW cmake load the appropriate Module/Platform/<MyHostPlatform>.cmake? Can we faked to be on "Linux-mingw32" Platform and write the proper Linux-mingw32.cmake file? Could you tell me why we could not TRY_RUN even if CC and CMAKE_C_FLAGS have been "overloaded"?
> Does CMake support cross-compiling in any way?
I think we will give it a try since our application since to compile nicely using a gcc cross-compiler whose host is Linux and target is mingw32. So we could produce both linux and win32 version of our libs on the same Linux box which could save us a lot of time.
> If not is it planned? Yes, we plan to separate the notion of host and target platform in order to support cross compiling. However this is still a way off in the future.
Are you interested in the result of our cross-compiling try using CMake? We may list what works and what's missing for a nice cross-compile support? -- Erk _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
