From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#18926: cmake-build-system should set CMAKE_INSTALL_LIBDIR and CMAKE_PREFIX_PATH Date: Mon, 03 Nov 2014 17:53:00 +0100 Message-ID: <874mugp6oj.fsf@gnu.org> References: <877fzdu45q.fsf@gmail.com> <87d295i556.fsf@gnu.org> <87sii02yax.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKsO-000812-BJ for bug-guix@gnu.org; Mon, 03 Nov 2014 11:53:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlKsI-0006Ir-BB for bug-guix@gnu.org; Mon, 03 Nov 2014 11:53:08 -0500 Received: from debbugs.gnu.org ([140.186.70.43]:50549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKsI-0006Ig-98 for bug-guix@gnu.org; Mon, 03 Nov 2014 11:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XlKsH-0004Hl-Pi for bug-guix@gnu.org; Mon, 03 Nov 2014 11:53:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87sii02yax.fsf@gmail.com> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Mon, 03 Nov 2014 21:44:54 +0800") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 18926@debbugs.gnu.org =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > Ludovic Court=C3=A8s writes: > >> =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: >> >>> if CMAKE_INSTALL_LIBDIR not set to `lib`, GNUInstallDirs.cmake will ins= tall >>> libraries files to $out/lib64. >> >> I found several CMake-built libraries on x86_64 (graphite2, openjpeg, >> qjson) that all use lib/, not lib64/. >> >> Then I found one counterexample, libftdi; however, setting >> CMAKE_INSTALL_LIBDIR=3Dlib doesn=E2=80=99t make any different: it still = installs >> libraries in $out/lib64. Any idea? > libftdi (not using GNUInstallDirs.cmake) handle this itself by > set LIB_SUFFIX, look like we have to set it specifically. Ah, OK. Still, graphite2, openjpeg, and qjson all install to $prefix/lib, even when not passing CMAKE_INSTALL_LIBDIR=3Dlib. Is it really needed? >>> if CMAKE_PREFIX_PATH not set to PATH of `inputs`, cmake will unable to >>> find cmake modules of inputs. >> >> You=E2=80=99re talking about .cmake files, right? > yes, but now I find out that they can under both lib/cmake and share/cmak= e. In that case... >> + ;; Search path used by 'FIND_PACKAGE' and 'INCLUDE'. >> + (search-path-specification >> + (variable "CMAKE_MODULE_PATH") >> + (directories '("lib/cmake"))))) ^ ... just add "share/cmake" here. ---=E2=80=99 Could you try that? > after add CMAKE_PREFIX_PATH with: > > (search-path-specification > (variable "CMAKE_PREFIX_PATH") > (directories '(""))) I thought about it, but that "" is inelegant and not as clear. > and here is the packages I'm working on: Looks like a good start. :-) Thanks, Ludo=E2=80=99.