Gentoo Archives: gentoo-devhelp

From: Nikos Chantziaras <realnc@×××××.com>
To: gentoo-devhelp@l.g.o
Subject: [gentoo-devhelp] Where should libraries be installed with cmake?
Date: Fri, 13 Jun 2014 21:59:04
Message-Id: lnfs65$cb$1@ger.gmane.org
1 I'm creating a cmake file for a project. According to the cmake docs,
2 this is how I should install libraries:
3
4 install(TARGETS MyLibrary DESTINATION lib)
5
6 This installs the library files into ${CMAKE_INSTALL_PREFIX}/lib. With a
7 "/usr" prefix, that's simply "/usr/lib".
8
9 But this doesn't look correct to me. What about "/usr/lib/lib64"? And I
10 can't just use "lib64", since that means the library will end up in the
11 wrong place on 32-bit systems.
12
13 How do I handle this? The cmake documentation provides zero help on
14 this. With autoconf, this wasn't a problem, since there are variables
15 for the various install paths. cmake seems to give me nothing of the sort?

Replies