[CMake] Full absolute path as RPATH in build tree

clinton at elemtech.com clinton at elemtech.com
Mon Dec 5 22:32:47 EST 2016


If you want the INSTALL_NAME_DIR to have effect in the build tree, you also need
set_target_properties(EMsoftLib PROPERTIES BUILD_WITH_INSTALL_RPATH ON)

Clint

----- On Dec 5, 2016, at 8:22 PM, Michael Jackson mike.jackson at bluequartz.net wrote:

> I have this:
> 
> if(APPLE AND BUILD_SHARED_LIBS)
>   set_target_properties(EMsoftLib PROPERTIES MACOSX_RPATH FALSE)
>   set_target_properties(EMsoftLib PROPERTIES INSTALL_NAME_DIR
> "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
> endif()
> 
> --
> Michael A. Jackson                 400 S. Pioneer Blvd
> Owner, President                   Springboro, Ohio 45066
> BlueQuartz Software, LLC           EMail: mike.jackson at bluequartz.net
> Voice: 937-790-1601                Web: http://www.bluequartz.net
> Fax: 937-746-0783
> 
> 
> clinton at elemtech.com wrote:
>> Do you want the library identification to be a full path?
>> set_target_properties(foo PROPERTIES MACOSX_RPATH OFF)
>>
>> Clint
>>
>> ----- On Dec 5, 2016, at 7:38 PM, Michael Jackson mike.jackson at bluequartz.net
>> wrote:
>>
>>> what combinations of RPATH variables do I need to set to get a full,
>>> absolute path to a build library in my build tree? THis is on macOS
>>> 10.10.5 and cmake 3.5 and above. I have tried all sorts of combinations
>>> and I either get just the library name or @rpath/library.dylib neither
>>> of which is going to work for my needs.
>>>
>>> Thanks
>>>
>>> --
>>> Michael A. Jackson
>>> BlueQuartz Software, LLC
>>> [e]: mike.jackson at bluequartz.net
>>> --
>>>
>>> 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


More information about the CMake mailing list