<div dir="ltr">find_package(a)<div style>if(a_FOUND)</div><div style> ExternalProject_Add(b PREFIX blabla ...)</div><div style>endif()</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 18, 2013 at 7:57 PM, Chris Stankevitz <span dir="ltr"><<a href="mailto:chrisstankevitz@gmail.com" target="_blank">chrisstankevitz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I have a library target ("a") that is a dependency of an executable<br>
("b"). I have many more libraries and many more executable, some with<br>
"complex" dependencies on the others. Sometimes target "a" cannot be<br>
built either because the user does not want it built or because<br>
FIND_PACKAGE failed to find a dependency of "a".<br>
<br>
Q: Can cmake automatically not build "b" when "a" is not available?<br>
<br>
I hope the answer is "yes" otherwise I will have to add IF(HAVE_A)<br>
code throughout my CMakeLists.txt file. Worse, in my complex file I<br>
will have to add lots of IF(HAVE_C), IF(HAVE_D) etc.<br>
<br>
Thank you,<br>
<br>
Chris<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>