On 04/20/2015 02:54 PM, victor sv wrote:
Hello again,

Sometimes we don't have control on external libraries compilation and we
don't know which compiler was used to generate external libraries

now my questions is,Is there a CMake-standard-way to proceed in these cases?

Proper shared libraries record their own load dependencies but with static libraries there is no generic way to record or retrieve the required link information.

The build process of the library might export that information in some form through e.g. pkg-config (.pc) files, custom configuration scripts (e.g. foo-config), libtool library files (.la) or cmake target exports with package configuration files.

If the library does not happen to provide a (working) cmake package configuration file the next best thing is probably writing a (or using an existing) cmake find module.

The find module could then try to guess static library dependencies based on information provided elsewhere (e.g. by querying pkg-config or parsing configuration files) or by falling back to manual user input.

Nils
--

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