[CMake] Installing and Exporting for multiple configurations
J Decker
d3ck0r at gmail.com
Sat Apr 6 18:01:33 EDT 2013
I see so the proper full path would be
get_property( existing_outname TARGET ${target} PROPERTY
OUTPUT_NAME )
if( NOT existing_outname )
set( existing_outname ${target} )
endif( NOT existing_outname )
DESTINATION
lib${LIB_SUFFIX}/${CMAKE_{STATIC,SHARED}_LIBRARY_PREFIX}${existing_outname}${CMAKE_{STATIC,SHARED}_LIBRARY_SUFFIX.
On Fri, Apr 5, 2013 at 8:29 AM, Matthew Woehlke <matthew.woehlke at kitware.com
> wrote:
> On 2013-04-04 19:19, J Decker wrote:
>
> On Thu, Apr 4, 2013 at 2:25 PM, Matthew Woehlke wrote:
>>
>>> On 2013-04-04 17:04, J Decker wrote:
>>>
>>>> Also, you should install to 'lib${LIB_SUFFIX}', not 'lib'. This will
>>>> allow
>>>>
>>>>> you (and distros packaging your software) to set LIB_SUFFIX to separate
>>>>> arch-specific components of 32- and 64-bit builds. E.g. on Linux,
>>>>> lib_suffix is usually ''/'64' or '32'/'', and on Windows might be
>>>>> ''/'/amd64'.
>>>>>
>>>>
>>>> if you're mentioning ${LIB_SUFFIX} you might as well mention
>>>> ${LIB_PREFIX}
>>>> which is the 'lib' prepended on gnuish systems.
>>>>
>>>
>>> ?
>>>
>>> I'm pretty sure my libraries don't get installed to /usr/liblib64...
>>> Maybe
>>>
>> you are thinking of the file name prefix, which is something different?
>>
>> right...but they do go to
>> /usr/lib64/${CMAKE_[SHARED/**STATIC]_LIBRARY_PREFIX}...${**
>> CMAKE_[SHARED/STATIC]_LIBRARY_**SUFFIX}
>>
>
> Like I said... LIB_SUFFIX != CMAKE_{STATIC,SHARED}_LIBRARY_**PREFIX.
>
> CMAKE_{STATIC,SHARED}_LIBRARY_**PREFIX is a built-in variable that
> affects default library file names in the build.
>
> LIB_SUFFIX is a de facto convention (originating from distro packagers I
> believe) which is appended to the 'lib' destination directory when
> installing things into 'lib', in order to conveniently support multi-arch
> aware systems; e.g. things get installed to /usr/lib64 because they are
> correctly installed to 'DESTINATION lib${LIB_SUFFIX}' with -DLIB_SUFFIX=64.
>
>
> --
> Matthew
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130406/0da0734c/attachment.htm>
More information about the CMake
mailing list