<div dir="ltr">Hi,<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 18, 2013 at 5:38 AM, John Gallagher <span dir="ltr"><<a href="mailto:johnkgallagher+cmake@gmail.com" target="_blank">johnkgallagher+cmake@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>Some Googling has led me to questions that have been asked that are similar to this one but I haven't seen a definitive answer. I'm trying to set up a CMake "superbuild" where there are dependencies between the subprojects, and some of the subprojects use find_package() to import targets from their dependencies (other subprojects, from the superbuild's point of view). For a stripped down example, suppose I have proj1 and proj2. proj1 can be built and installed on its own, and it writes out a Proj1Config.cmake file (with targets and such). proj2 uses</div>
<div><br></div><div>find_package(Proj1 REQUIRED)</div><div><br></div><div>to import those targets. So independent of a CMake superbuild, things work just fine if I configure, build, and install proj1, *then* configure, build, and install proj2. Is there a way to do this using a CMake superbuild? Some ideas (mostly gleaned from the aforementioned googling):</div>
</div></blockquote><div><br></div><div style>I haven't used it yet, but this sounds like you should look into the ExternalProject module of CMake. See <a href="http://cmake.org/cmake/help/v2.8.10/cmake.html#module:ExternalProject">http://cmake.org/cmake/help/v2.8.10/cmake.html#module:ExternalProject</a></div>
<div style><br></div><div style></div></div></div><div class="gmail_extra" style>Andreas</div></div>