Hi all,

a general question:
I have a dependency chain of libraries

A -> B -> C -> ... -> Z

and all of those libraries are built with CMake, using CMake's export
functionality [1] to let the next in the chain know about its the
dependencies.
If all of the libraries are built statically and A needs some symbols
from a third-party library A1, this information needs to travel to Z.
Right now, in the export file I'm writing out the link line as

set(a_EXTRA_LIBS -lhdf5 -lhdf5_hl -ldl -lm -lz -lcurl)

and then in B

set(b_EXTRA_LIBS "<some other libs> -lhdf5 -lhdf5_hl -ldl -lm -lz -lcurl")

and so on.
Is that the preferred way to handle this in CMake? Any other recommendations?

Cheers,
Nico


[1] http://www.cmake.org/cmake/help/v3.0/module/CMakePackageConfigHelpers.html
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to