Hello, all.

I work on a cross-platform project that has many libraries and several
applications. CMake on Linux naturally adds the TARGET_LINK_LIBRARIES
specified in the libraries after those specified in the
TARGET_LINK_LIBRARIES for the application. However, there are several
common system libraries, for example pthread, that are used by many of
the libraries and most of the applications.

The current scripts only have the common system libraries specified in a
few scattered places. And, it works. However, we're trying to change to
statically link these libraries and the links are failing with
"undefined reference" errors. When I manually modify link.txt to add the
various system libraries to the end of the compilation line, it works.
So, rather than going through all of the scripts (of which there are
many), I would like to be able to list them so they are added to the end
of every link.

Is there a way to identify libraries in such a way that they are added
to the end of the compilation line rather than having to add those
libraries to every library and application that requires them?

Thanks!

Mike
-- 

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