Gentoo Archives: gentoo-devhelp

From: justin <jlec@g.o>
To: gentoo-devhelp@l.g.o
Subject: Re: [gentoo-devhelp] Where should libraries be installed with cmake?
Date: Sat, 14 Jun 2014 11:36:04
Message-Id: 539C339B.8080500@gentoo.org
In Reply to: [gentoo-devhelp] Where should libraries be installed with cmake? by Nikos Chantziaras
1 On 13/06/14 23:58, Nikos Chantziaras wrote:
2 > I'm creating a cmake file for a project. According to the cmake docs,
3 > this is how I should install libraries:
4 >
5 > install(TARGETS MyLibrary DESTINATION lib)
6 >
7 > This installs the library files into ${CMAKE_INSTALL_PREFIX}/lib. With a
8 > "/usr" prefix, that's simply "/usr/lib".
9 >
10 > But this doesn't look correct to me. What about "/usr/lib/lib64"? And I
11 > can't just use "lib64", since that means the library will end up in the
12 > wrong place on 32-bit systems.
13 >
14 > How do I handle this? The cmake documentation provides zero help on
15 > this. With autoconf, this wasn't a problem, since there are variables
16 > for the various install paths. cmake seems to give me nothing of the sort?
17 >
18 >
19
20 Hi,
21
22 the cmake-utils.eclass defines following two variables which help you
23
24 LIB_SUFFIX library path suffix
25 CMAKE_INSTALL_LIBDIR Output directory for libraries
26
27 It seems later is defined recent cmake too.
28
29 Justin

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-devhelp] Re: Where should libraries be installed with cmake? Nikos Chantziaras <realnc@×××××.com>