<html><body bgcolor="#FFFFFF"><div>What is line 49 of your CMakeLists file...? The output indicates it has a command on it that yields the error...</div><div><br><br>On Aug 12, 2011, at 9:55 PM, Doug &lt;<a href="mailto:douglas.linder@gmail.com">douglas.linder@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><div>I see.</div><div><br></div>I've tried this approach and I get the error:<div><div>-- Found LIBPNG</div><div>CMake Error at CMakeLists.txt:49 (export):</div><div>&nbsp; export given target "/usr/lib/libpng.so" which is not built by this</div>
<div>&nbsp; project.</div><div><br></div><div><br></div><div>-- Configuring incomplete, errors occurred!</div></div><div><br></div><div>~</div><div>Doug.<br><br><div class="gmail_quote">On Fri, Aug 12, 2011 at 4:57 PM, Michael Wild <span dir="ltr">&lt;<a href="mailto:themiwi@gmail.com"><a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a></a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Fri 12 Aug 2011 10:49:45 AM CEST, Doug wrote:<br>
&gt; I'm sorry if I'm being dumb here, but I fail to see how that helps.<br>
&gt;<br>
&gt; That example is one where foobar depends explicitly on foo and bar.<br>
&gt;<br>
&gt; What if foo depends on bar2?<br>
&gt;<br>
&gt; How do I inherit that dependency from foo in foobar?<br>
&gt;<br>
&gt; _that's_ what I'm looking for.<br>
&gt;<br>
&gt; (If that example somehow explains that, I'm sorry, I can't see it. Can<br>
&gt; you point to a specific point in the page?)<br>
&gt;<br>
&gt; ~<br>
&gt; Doug.<br>
&gt;<br>
&gt; On Fri, Aug 12, 2011 at 2:34 PM, Michael Wild &lt;<a href="mailto:themiwi@gmail.com"><a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a></a><br>
</div><div class="im">&gt; &lt;mailto:<a href="mailto:themiwi@gmail.com"><a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a></a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; If the projects are independent, you might want to take a look at this<br>
&gt; &nbsp; &nbsp; Wiki page:<br>
&gt; &nbsp; &nbsp; <a href="http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file" target="_blank"><a href="http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file">http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file</a></a>.<br>
&gt;<br>
&gt; &nbsp; &nbsp; HTH<br>
&gt;<br>
&gt; &nbsp; &nbsp; Michael<br>
&gt;<br>
<br>
</div>And that is what the example is *about*. The FooBar project *exports*<br>
its targets, along with their dependencies, so that when other projects<br>
do find_package(FooBar), they will be able to link against the foo<br>
library without having to know any of the dependencies of it. E.g. the<br>
project "hello" might look like this:<br>
<br>
project(hello)<br>
find_package(FooBar REQUIRED)<br>
include_directories(${FOOBAR_INCLUDE_DIRS})<br>
add_executable(hello hello.c)<br>
target_link_libraries(hello ${FOOBAR_LIBRARIES})<br>
<font color="#888888"><br>
<br>
Michael<br>
</font></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Powered by <a href="http://www.kitware.com"><a href="http://www.kitware.com">www.kitware.com</a></a></span><br><span></span><br><span>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></a></span><br><span></span><br><span>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ"><a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a></a></span><br><span></span><br><span>Follow this link to subscribe/unsubscribe:</span><br><span><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></span></div></blockquote></body></html>