[cmake-developers] [PATCH] VS, WINCE: Fix entry point for Unicode builds

Bach, Pascal pascal.bach at siemens.com
Tue Dec 9 10:57:36 EST 2014


> The closest place to something like that is here:
> 
>  http://www.cmake.org/cmake/help/v3.1/manual/cmake-
> toolchains.7.html#cross-compiling-for-windows-ce
> 
> However, in this case isn't a new target property needed to provide
> a clean way to set the entry point?  That property would at least have
> the reference documentation.

The new property is not strictly necessary.

Setting:

set_target_properties(target PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")

would also work because it is a link flag for MSVC.

On the other hand instead of setting WIN32_EXECUTABLE it would also be possible to just set:

set_target_properties(target PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")

but the former is more convenient for the end user.

I don't know what would be better? For consistency reason there could be something like a WIN32_ENTRYPOINT property.

Pascal


More information about the cmake-developers mailing list