On 14 November 2011 17:17, Robert Dailey <rcdai...@gmail.com> wrote: > So basically all third party libraries we use are not installed > individually, instead we have a server on our intranet that contains > precompiled versions of all libraries in a specific and consistent > hierarchy. For this reason, it doesn't make sense to use find_library(), > which would normally always give you absolute paths to your library files > and thus link_directories() would not be needed.
A typical Linux user can say the same: I have all my libraries in /usr/lib so it does not make sense to use find_library. No point arguing if it would make sense or not. Simply, find_library is a unified convention used by CMake, it works regardless user-specific filesystem structure. Simply, it would not hurt to use find_library(). Then, you can follow the CMake convention, without a need of custom scripts, etc. > I pass each one of these to target_link_libraries() and I leave it up to the > compiler to search for where to find the file in the provided link > directories. IMO, you don't buy anything with this customisation. Either CMake finds library and tells compiler "look, it's here" or CMake + custom script approximates library location and lets linker to find it. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake