On 09/18/2014 07:52 AM, Volker Pilipp wrote:
That actually does the trick. But it's not nice, because there are many
targets in the project.
Actually, I do not know about any use case, where cmake should replace a
full path to a lib
by its "-l" shortcut.

There are as far as I understand two use cases.

- The library does not have a SONAME
Linking to the library by path would embed the full path of the library in the target rather than just the name (which is what it does with -l or when the library does have a SONAME set)

- The second use case I am not familiar with myself but the explanation in the code is:
  // Many system linkers support multiple architectures by
  // automatically selecting the implicit linker search path for the
  // current architecture.  If the library appears in an implicit link
  // directory then just report the file name without the directory
  // portion.  This will allow the system linker to locate the proper
  // library for the architecture at link time.

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