[CMake] Has anybody tried to use CMake to build software on the MinGW/MSYS/Wine platform?

Clinton Stimpson clinton at elemtech.com
Mon Mar 29 14:43:23 EDT 2010


On Monday 29 March 2010 12:27:17 pm Alan W. Irwin wrote:
> Wine (winehq.com) is free (in both senses) software that provides a Windows
> work-alike that appears (from news stories, I have no personal experience
> yet) to be fairly mature.
> 
> Thus, I was wondering whether anybody here had tried MinGW/MSYS/Wine as a
> platform for building software with CMake?  Note, I am not discussing a
> MinGW cross-compile possibility.  Instead, I am discussing running
> MinGW/MSYS and CMake directly under Wine.
> 
> Currently my only platform is Linux, and I have no practical experience
>  with the Windows platform (either Wine or proprietary versions) at this
>  stage. Nevertheless, if the MinGW/MSYS/Wine platform choice is known to
>  work with CMake, that would motivate me to learn enough about using
>  Windows so that I could use MinGW/MSYS/Wine on CMake myself.


I just tried an experiment and it worked.

=== cmakelists.txt ===
project(hello)
add_executable(hello hello.c)
target_link_libraries(hello gdi32)
===

Where hello.c was a Win32 "hello world" example grabbed off the internet.
Then use winegcc and wineg++ as your compiler (that is: no cross-compiling 
setup in CMake).

Clint


More information about the CMake mailing list