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: Sun, 04 Jan 2015 18:06:26 +0100 Message-ID: <87wq52327h.fsf@gnu.org> References: <877fzdu45q.fsf@gmail.com> <87d295i556.fsf@gnu.org> <87sii02yax.fsf@gmail.com> <874mugp6oj.fsf@gnu.org> <871tpjb0hk.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]:53770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7odw-0001SJ-HZ for bug-guix@gnu.org; Sun, 04 Jan 2015 12:07:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7odr-0000Ll-8h for bug-guix@gnu.org; Sun, 04 Jan 2015 12:07:08 -0500 Received: from debbugs.gnu.org ([140.186.70.43]:55397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7odr-0000Le-6E for bug-guix@gnu.org; Sun, 04 Jan 2015 12:07:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y7odq-0002TA-Ki for bug-guix@gnu.org; Sun, 04 Jan 2015 12:07:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <871tpjb0hk.fsf@gmail.com> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Tue, 04 Nov 2014 20:42:47 +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: >> >>> 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 i= nstall >>>>> 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 stil= l 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? > Not sure, it's just for packages using GNUInstallDirs.cmake. >> >>>>> 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/cm= ake. >> >> 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? > Well, it not work, here is the exact output by liblxqt: [...] >>> 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. > Yes, it not feeling good, but I have no better idea now. In =E2=80=98core-updates=E2=80=99 it=E2=80=99s now possible to specify file= patterns, so we could look for *.cmake files under lib/cmake or share/cmake like this: (search-path-specification (variable "CMAKE_MODULE_PATH") (files '("lib/cmake" "share/cmake")) (file-type 'regular) (file-pattern "\\.cmake$")) Would it help? What else is needed? Ludo=E2=80=99.