public inbox for gentoo-devhelp@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-devhelp] Where should libraries be installed with cmake?
@ 2014-06-13 21:58 Nikos Chantziaras
  2014-06-14 11:35 ` justin
  0 siblings, 1 reply; 3+ messages in thread
From: Nikos Chantziaras @ 2014-06-13 21:58 UTC (permalink / raw
  To: gentoo-devhelp

I'm creating a cmake file for a project. According to the cmake docs, 
this is how I should install libraries:

   install(TARGETS MyLibrary DESTINATION lib)

This installs the library files into ${CMAKE_INSTALL_PREFIX}/lib. With a 
"/usr" prefix, that's simply "/usr/lib".

But this doesn't look correct to me. What about "/usr/lib/lib64"? And I 
can't just use "lib64", since that means the library will end up in the 
wrong place on 32-bit systems.

How do I handle this? The cmake documentation provides zero help on 
this. With autoconf, this wasn't a problem, since there are variables 
for the various install paths. cmake seems to give me nothing of the sort?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-devhelp] Where should libraries be installed with cmake?
  2014-06-13 21:58 [gentoo-devhelp] Where should libraries be installed with cmake? Nikos Chantziaras
@ 2014-06-14 11:35 ` justin
  2014-06-14 15:39   ` [gentoo-devhelp] " Nikos Chantziaras
  0 siblings, 1 reply; 3+ messages in thread
From: justin @ 2014-06-14 11:35 UTC (permalink / raw
  To: gentoo-devhelp

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

On 13/06/14 23:58, Nikos Chantziaras wrote:
> I'm creating a cmake file for a project. According to the cmake docs,
> this is how I should install libraries:
> 
>   install(TARGETS MyLibrary DESTINATION lib)
> 
> This installs the library files into ${CMAKE_INSTALL_PREFIX}/lib. With a
> "/usr" prefix, that's simply "/usr/lib".
> 
> But this doesn't look correct to me. What about "/usr/lib/lib64"? And I
> can't just use "lib64", since that means the library will end up in the
> wrong place on 32-bit systems.
> 
> How do I handle this? The cmake documentation provides zero help on
> this. With autoconf, this wasn't a problem, since there are variables
> for the various install paths. cmake seems to give me nothing of the sort?
> 
> 

Hi,

the cmake-utils.eclass defines following two variables which help you

LIB_SUFFIX             library path suffix
CMAKE_INSTALL_LIBDIR   Output directory for libraries

It seems later is defined recent cmake too.

Justin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 1016 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-devhelp] Re: Where should libraries be installed with cmake?
  2014-06-14 11:35 ` justin
@ 2014-06-14 15:39   ` Nikos Chantziaras
  0 siblings, 0 replies; 3+ messages in thread
From: Nikos Chantziaras @ 2014-06-14 15:39 UTC (permalink / raw
  To: gentoo-devhelp

On 14/06/14 14:35, justin wrote:
> On 13/06/14 23:58, Nikos Chantziaras wrote:
>> I'm creating a cmake file for a project. According to the cmake docs,
>> this is how I should install libraries:
>>
>>    install(TARGETS MyLibrary DESTINATION lib)
>>
>> This installs the library files into ${CMAKE_INSTALL_PREFIX}/lib. With a
>> "/usr" prefix, that's simply "/usr/lib".
>>
>> But this doesn't look correct to me. What about "/usr/lib/lib64"? And I
>> can't just use "lib64", since that means the library will end up in the
>> wrong place on 32-bit systems.
>>
>> How do I handle this? The cmake documentation provides zero help on
>> this. With autoconf, this wasn't a problem, since there are variables
>> for the various install paths. cmake seems to give me nothing of the sort?
>>
>>
>
> Hi,
>
> the cmake-utils.eclass defines following two variables which help you
>
> LIB_SUFFIX             library path suffix
> CMAKE_INSTALL_LIBDIR   Output directory for libraries
>
> It seems later is defined recent cmake too.

It seems the cmake docs are somewhat out of date. I just did a grep for 
CMAKE_INSTALL_LIBDIR in the cmake-2.8.12.2 sources, and indeed the 
variable is there.

Thanks!



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-14 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 21:58 [gentoo-devhelp] Where should libraries be installed with cmake? Nikos Chantziaras
2014-06-14 11:35 ` justin
2014-06-14 15:39   ` [gentoo-devhelp] " Nikos Chantziaras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox