On Monday 19 December 2011, Benjamin Eikel wrote:
> Hello Alexander,
> 
> Am Montag, 12. Dezember 2011, 21:51:54 schrieb Alexander Neundorf:
> > Here is an example which shows just that:
> > https://projects.kde.org/projects/kde/kdeexamples/repository/revisions/ma
> > st er/show/buildsystem/HowToInstallALibrary
> > 
> > It's not "final" yet, i.e. I'll work on improving it in the next weeks.
> 
> thank you very much for this example project. It helped me a lot to
> understand especially the EXPORT usage.
> 
> I know that you wrote that the project is not finished yet, but allow me to
> ask a question:
> 
> In the "example/CMakeLists.txt": Is line 5, which calls
> "include(FindPackageHandleStandardArgs)", really needed? I think if
> BAR_FOUND would be checked, it should be called. 

Line 6 is commented out because it relies on a feature in cmake 2.8.3, but 
when I committed the example I made it depend only on 2.6.4.

Does that answer your question ?

> I would greatly appreciate it if you could extend the example, or provide a
> second example, that uses an external library. So for example a library Foo
> depending on LibXml2. Some functionality of Foo depends on whether LibXml2
> was found or not. Therefore it creates "Foo_Config.h" with
> "configure_file" defining something like LIB_XML2. I would like to see how
> this could be correctly installed and found by an application using Foo.
> Would it be simply adding the config header file to the set of exported
> header files?

I'd put that information into the installed FooConfig.cmake, something like:
set(FOO_HAS_LIBXML2_FEATURES TRUE)

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to