On 5/3/10 1:39 AM, Michael Wild wrote:
This won't do, it will produce a console-window when the executable is
double-clicked. Windows is a PITA. Perhaps something like:
add_executable(simple WIN32 simple.c)
set_source_files_properties(simple.c PROPERTIES
COMPILE_DEFINITIONS main=WinMain)
Michael
On 2. May, 2010, at 21:46 , Mike Jackson wrote:
add_executable(simple simple.c)
On Sun, May 2, 2010 at 10:20 AM, Mr Shore<shore.cl...@gmail.com> wrote:
I can achieve this by gcc :
gcc -mwindows -o simple simple.c
But only find this in cmake:
add_executable(simple WIN32 simple.c)
But it's not exactly the same as -mwindows,
this will require the entry point to be WinMain,
while gcc -mwindows doesn't require this.
How should I do it properly?
Well, the typical way _is_ to have WinMain as your entry point. If that
won't do, you can add -mwindows to CMAKE_C_FLAGS if you're on Windows
and using GCC.
Ryan
--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University
rpav...@iastate.edu
http://academic.cleardefinition.com/
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake