# ExternalProject, superbuilds and Visual Studio

**URL:** <https://discourse.cmake.org/t/externalproject-superbuilds-and-visual-studio/794>\
**Category:** Code\
**Tags:** os:windows, gen:vs\
**Created:** [March 11, 2020, 7:25pm UTC](https://discourse.cmake.org/t/externalproject-superbuilds-and-visual-studio/794 "2020-03-11T19:25:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)\
**Post date:** [March 12, 2020, 8:20am UTC](https://discourse.cmake.org/t/externalproject-superbuilds-and-visual-studio/794/2 "2020-03-12T08:20:50Z")

</div>

> [@Zomgrolf](#):
>
> Is there some clever solution I’ve missed? Is there a way to use the superbuild script AND have the typical VS project for B in the same solution working nicely? Should I just forget about superbuild in this case?

Yes, there is a piece of the puzzle one could say you missed: `ExternalProject_Add` creates a standalone VS solution for the project being added. The normal course of action when using a superbuild (the recommended usage of ExternalProject) is as follows:

1. Generate the superbuild project.
2. Open the `.sln` of the superbuild project and build it. This will build and install A, and also generate (and build) project B.
3. Close that `.sln`, and instead open the `.sln` generated for B. Do further development using that. Your dependencies are already correctly set up and installed by the build of the superbuild project in the previous step.

So while there is no way to have “configure A” and “develop B normally” in the same `.sln`, you can “configure A” and “develop B normally, with dependecies to A correctly set up.” This is (AFAIK) the intended use for ExternalProject superbuilds, and from my own experience works fine.

---

_[View the full topic](https://discourse.cmake.org/t/externalproject-superbuilds-and-visual-studio/794)._
