On 05/12/2015 04:24 PM, Mattias Helsing wrote: > I'm wondering what the proper way is to go about finding 64-bit > versions of a library.
The find_library command automatically adds "64" to "lib" directories if the FIND_LIBRARY_USE_LIB64_PATHS global property is set and the target architecture is 64-bit: http://www.cmake.org/cmake/help/v3.2/command/find_library.html http://www.cmake.org/cmake/help/v3.2/prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS.html The global property is normally set automatically for the current operating system. Note that Debian-based distros do not use lib64 in their packages so it is not enabled there. On such distros hand-built packages should also be configured to avoid lib64 paths. > My situation is that I have built > OpenSceneGraph 64-bit and installed it. The libraries end up in > /usr/whatever/lib64. But to be able to find the libraries I needed to > modify Modules/FindOpenThreads.cmake and > Modules/Findosg_functions.cmake to also search lib64 suffixes > (modified PATH_SUFFIXES). CMake's find modules for OSG were created long ago, but ideally OSG should distribute cmake package configuration files as documented here: http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html That way only a single find_package call is needed and CMake does not have to find individual library files. -Brad -- 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-developers
