visual-studiobuildcmakevcxproj

CMAKE build different platform in one solution


Hello.

From cmake i'm generate visual studio(2013) solution with x64 generator, and include_external_msproject which have only win32 platform.

When i'm open solution, by default, my win32 solution excluded from build(Field Build don't checkmark).

Question, how i can set force build for win32 project from cmake?

For example:

include_external_msproject(splash ${CMAKE_SOURCE_DIR}/splash.vcxproj)

screen


Solution

  • Function have parametrs PLATFORM, which set default platform. Be warning your external project, must have same number of configuration and platform. Exmaple: If your main solution have MinSizeRel Win32, your external project must have too.

    include_external_msproject(splash ${CMAKE_SOURCE_DIR}/splash.vcxproj PLATFORM Win32)