[cmake-developers] Windows Store generated solution also containing win32 console app?

Brad King brad.king at kitware.com
Tue Jan 27 12:42:59 EST 2015


On 01/27/2015 12:03 PM, Robert Goulet wrote:
> CMake uses a global variable that essentially means that the generator
> targets a Windows Store app. This makes it difficult to hack it to
> control this per project rather than globally.

This is a fundamental limitation of the design of CMake, not just of
the VS generator.  We only support one target arch/platform at a time.
The entire configuration process runs with one platform in mind, and
one toolchain per language.  This is the same reason one cannot build
host binaries while cross compiling.  Even if one were to hack the
VS generator to set the type of one .vcxproj file, it still would not
have proper information to generate the other properties in the file.

You could try running CMake with execute_process to generate a second
nested build tree, and then include_external_msproject to make one of
its .vcxproj files available in the outer .sln.  I've not tried this
though.

-Brad



More information about the cmake-developers mailing list