Hi,

I have a CMake project that when installed provides a FindFoo.cmake module
whose internals rely on find_path, find_library, etc.. I am considering
switching the module implementation to a foo-config.cmake script and target
exporting/importing. In the process I have run into a couple of hurdles and
I'd like to know if they are easy to overcome:

- In the current FindFoo module,  the list of libraries associated to the
package are contained in a Foo_LIBRARIES variable, and I would like to
preserve the existing interface, e.g., continue to do
target_link_libraries(bar ${Foo_LIBRARIES}). Is there an automated way to
obtain such a variable, I mean, one that contains all the targets (and
preferrable only the libraries) exported by Foo?

- I am storing Foo's header files in Foo_INCLUDE_DIRS. However, I'm also
interested in including Foo's external dependency paths (say, bring Boost's
headers into scope when I use Foo). Must I do this manually in my
foo-config.cmake script?.

I haven't found anything in the docs that points that this might be
possible. Maybe it's something too specific of my use-case.

Cheers,

-- 
Adolfo Rodríguez Tsouroukdissian

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
_______________________________________________
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