[cmake-developers] Target's IMPORTED_LOCATION_* when CMAKE_INSTALL_PREFIX or CPACK_PACKAGING_INSTALL_PREFIX is "/"

Ben Keller irods.ben.keller at gmail.com
Tue Sep 6 16:31:26 EDT 2016


Thank you

On Tue, Sep 6, 2016 at 3:24 PM, Brad King <brad.king at kitware.com> wrote:
> On 09/06/2016 03:00 PM, Ben Keller wrote:
>> The workaround we are using for this currently is to compile a
>> modified version of cmake that appends the following cmake code below
>> the get_filename_component stanza in <PROJECTS>Targets.cmake:
>>
>> if("${_IMPORT_PREFIX}" STREQUAL "/")
>>   set(_IMPORT_PREFIX "")
>> endif()
>
> I would consider that a fix rather than a workaround.  We don't know
> the prefix that will be computed since this block is meant to make
> the package relocatable.  We do know that references to the prefix
> are always followed by "/" so it is safe to leave it as an empty
> string.
>
> Please post the patch.
>
> Thanks,
> -Brad
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edit_IMPORT_PREFIX.patch
Type: text/x-patch
Size: 1888 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160906/fafa7c89/attachment.bin>


More information about the cmake-developers mailing list