The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=15868 
====================================================================== 
Reported By:                Lucas Christian
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15868
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-11-30 22:58 EST
Last Modified:              2015-11-30 22:58 EST
====================================================================== 
Summary:                    Property INSTALL_NAME_DIR is completely ignored
Description: 
CMake ignores the INSTALL_NAME_DIR property unless the following properties are
set:
- BUILD_WITH_INSTALL_RPATH is TRUE
- SKIP_RPATH is FALSE
- SKIP_INSTALL_RPATH is FALSE

In some cases, users may wish to use INSTALL_NAME_DIR without having any
intention of using any path-related features.  For example, I may want my
executables to link to libraries encoding the absolute path "/usr/local/lib" in
the executable for each library.  This has nothing to do with rpath.

In both the build tree and install destination, the emitted library name is
"@rpath/mylib.dylib" despite explicitly setting INSTALL_NAME_DIR otherwise. 
Enabling BUILD_WITH_INSTALL_RPATH does cause the correct path to be emitted, but
this requirement is not obvious, and likely unintentional.

Steps to Reproduce: 
Produce a simple CMake file that builds an executable against a shared library. 
Set these to install into /usr/local root.

Include set(CMAKE_INSTALL_NAME_DIR "/usr/local/lib")

Additional Information: 
Cursory examination of the CMake source code suggests this issue may be rooted
in "cmGeneratorTarget.cxx", likely the code for generating install_path is
getting short-circuited by some additional checks on the rpath* properties.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-11-30 22:58 Lucas ChristianNew Issue                                    
======================================================================

-- 

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

Reply via email to