FWIW, I do question this rewriting feature, because it clearly can go wrong.
I'd argue that programmers (or build script/cmake modules/...) usually have good reason when they give the absolute path to a library: making darn sure it's indeed that one that gets linked. While I agree that replacing a full path with the -lfoo notation makes the final command shorter and thus more readable it can also introduce subtle bugs. The fact that a library can be found by the linker because it's on the search path doesn't mean that the linker will find the right, intended library. In my case I could get the correct linking by just adding -L/opt/local/lib, but what if for some reason I had wanted to include the system libpng, i.e. if PNG_LIBRARIES had pointed to /usr/lib/libpng.so? I hope this is not such a corner case that Kitware haven't foreseen it and implemented a way to deactivate the rewriting? R. -- 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