0

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

pingWIN
  • 1
  • 3
  • Welcome to StackOverflow. Can you please add your CMake code doing the `include_external_msproject()`? See [mcve]. I'm asking because normally the external projects are included in the default build. Generally speaking you can control this with e.g. `set_target_properties(MyExtProject PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 0)`. – Florian Jul 28 '16 at 10:39
  • ok, i'm editing my question. set_target_properties(splash PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 0) doesn't help – pingWIN Jul 28 '16 at 11:13
  • Can you give the solution described [here](http://stackoverflow.com/questions/15859576/c-sharp-projects-in-cmake-made-vs2010-solution-must-be-unloaded-reloaded-to-avoi) a try? – Florian Jul 28 '16 at 12:31
  • Thx your link helped. Need add parammetrs PLATFORM Win32 on include function. – pingWIN Jul 28 '16 at 13:35

1 Answers1

0

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)
pingWIN
  • 1
  • 3