From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 14F2F13877A for ; Sat, 14 Jun 2014 15:39:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 98783E08EF; Sat, 14 Jun 2014 15:39:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 08930E08EF for ; Sat, 14 Jun 2014 15:39:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 5177733FD41 for ; Sat, 14 Jun 2014 15:39:54 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: 0.005 X-Spam-Level: X-Spam-Status: No, score=0.005 tagged_above=-999 required=5.5 tests=[AWL=-0.544, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.651, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no Received: from smtp.gentoo.org ([IPv6:::ffff:127.0.0.1]) by localhost (smtp.gentoo.org [IPv6:::ffff:127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d8YYuY1yBuwM for ; Sat, 14 Jun 2014 15:39:48 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6171433FF14 for ; Sat, 14 Jun 2014 15:39:47 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wvq3S-0006cw-CB for gentoo-devhelp@gentoo.org; Sat, 14 Jun 2014 17:39:42 +0200 Received: from athedsl-348347.home.otenet.gr ([85.72.216.89]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jun 2014 17:39:42 +0200 Received: from realnc by athedsl-348347.home.otenet.gr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jun 2014 17:39:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-devhelp@lists.gentoo.org From: Nikos Chantziaras Subject: [gentoo-devhelp] Re: Where should libraries be installed with cmake? Date: Sat, 14 Jun 2014 18:39:26 +0300 Organization: Lucas Barks Message-ID: References: <539C339B.8080500@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Development-related help X-BeenThere: gentoo-devhelp@gentoo.org X-BeenThere: gentoo-devhelp@lists.gentoo.org Reply-To: gentoo-devhelp@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: athedsl-348347.home.otenet.gr User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <539C339B.8080500@gentoo.org> X-Archives-Salt: bc3f363f-9863-4bf6-9faa-4cce969f0ff6 X-Archives-Hash: c07bd4045206e9f31d2ca1c6b287b3ac 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!