I have a project that links against an external dynamic library for which I have written a Find module that creates an import target. I do this, in part, by setting the IMPORTED_LOCATION property of the target to the location of the dynamic library.
Unfortunately, on OSX the library shows up in the executable load commands as an LC_LOAD_DYLIB of the raw filename (no directory) of the shared library. I expected it to use the whole path. I tried setting the INSTALL_NAME_DIR property to the directory containing the shared library, but this changed nothing. I will note that this is all still in the build location, as opposed to post-install. I am using the following settings currently: set(CMAKE_SKIP_BUILD_RPATH false) set(CMAKE_BUILD_WITH_INSTALL_RPATH false) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) set(CMAKE_MACOSX_RPATH true) I'm not 100% confident with how these options interact, so I am more than prepared for someone to tell me that I am doing something wrong. Any hints would be appreciated. -- Michael Welsh Duggan ([email protected]) -- 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: https://cmake.org/mailman/listinfo/cmake
