<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 <<a href="mailto:douglas.linder@gmail.com">douglas.linder@gmail.com</a>> 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> export given target "/usr/lib/libpng.so" which is not built by this</div>
<div> 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"><<a href="mailto:themiwi@gmail.com"><a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a></a>></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>
> I'm sorry if I'm being dumb here, but I fail to see how that helps.<br>
><br>
> That example is one where foobar depends explicitly on foo and bar.<br>
><br>
> What if foo depends on bar2?<br>
><br>
> How do I inherit that dependency from foo in foobar?<br>
><br>
> _that's_ what I'm looking for.<br>
><br>
> (If that example somehow explains that, I'm sorry, I can't see it. Can<br>
> you point to a specific point in the page?)<br>
><br>
> ~<br>
> Doug.<br>
><br>
> On Fri, Aug 12, 2011 at 2:34 PM, Michael Wild <<a href="mailto:themiwi@gmail.com"><a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a></a><br>
</div><div class="im">> <mailto:<a href="mailto:themiwi@gmail.com"><a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a></a>>> wrote:<br>
><br>
> If the projects are independent, you might want to take a look at this<br>
> Wiki page:<br>
> <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>
><br>
> HTH<br>
><br>
> Michael<br>
><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>