<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello John,<br>
<br>
I made some generic scripts to answer has those kind of problem.
There is an example in the folder Examples/FrameworkTest.<br>
<br>
You can find the scripts on GitHub:
<a class="moz-txt-link-freetext" href="https://github.com/Athius/FrameworkCMakeToolkit">https://github.com/Athius/FrameworkCMakeToolkit</a><br>
<br>
I hope this is helpful.<br>
<br>
Best regards,<br>
<br>
Romain<br>
<br>
Le 18/04/13 05:38, John Gallagher a écrit :<br>
</div>
<blockquote
cite="mid:CAFoDJR-oQxjdNgDh020SWRX0_pdcJ8E=+8mEEWHnVYjwXvUsKA@mail.gmail.com"
type="cite">
<div dir="ltr">Hello all,
<div><br>
</div>
<div style="">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 style=""><br>
</div>
<div style="">find_package(Proj1 REQUIRED)</div>
<div style=""><br>
</div>
<div style="">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 style=""><br>
</div>
<div style="">1. Use add_subdirectory() from the superproject. I
think the REQUIRED on find_package() would fail though? In my
case I can modify the subprojects, but I would like for them
to continue to build correctly standalone (not inside the
superbuild), as they really are separate projects. Is there a
way to make add_subdirectory() work without exploding on
find_package?</div>
<div style=""><br>
</div>
<div style="">2. Don't use CMake for the "superbuild" - a shell
script or plain Makefile could accomplish this pretty easily,
but that seems a little hokey.</div>
<div style=""><br>
</div>
<div style="">
3. (This one is unclear.) Somehow build proj1 before
configuring proj2, and point proj2 at proj1's build directory
so it can find Proj1Config.cmake. This seems fragile at best
(prefix, RPATH, etc issues).</div>
<div style="">
<br>
</div>
<div style="">Appreciate any advice!</div>
<div style=""><br>
</div>
<div style="">John</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
</blockquote>
<br>
</body>
</html>