From: Branan R. <br...@gm...> - 2008-09-09 17:50:57
|
You are, of course, absolutely right about it breaking non-msvc. Also, since you've reminded me that all the examples are in one CMake file, you can set the property for all of the targets in one command - just place all of the targets before PROPERTIES: set_target_properties(boing splitview triangle wave PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup") Branan On Tue, Sep 9, 2008 at 10:34 AM, Camilla Berglund <cam...@gm...> wrote: > Branan Riley wrote: >> IF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") >> SET_TARGET_PROPERTIES(<exename> PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup") >> ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") > > That won't make GCC-based (or any other non-VS) build chains happy, though. > > How about something like: > > if(MSVC) > set_target_properties(boing PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup") > set_target_properties(splitview PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup") > set_target_properties(triangle PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup") > set_target_properties(wave PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup") > endif(MSVC) > > Oh, and -mno-cygwin isn't set yet. I'll fix that not today. > > Regards, > elmindreda |