From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Subject: bug#18926: cmake-build-system should set CMAKE_INSTALL_LIBDIR and CMAKE_PREFIX_PATH Date: Tue, 04 Nov 2014 20:42:47 +0800 Message-ID: <871tpjb0hk.fsf@gmail.com> References: <877fzdu45q.fsf@gmail.com> <87d295i556.fsf@gnu.org> <87sii02yax.fsf@gmail.com> <874mugp6oj.fsf@gnu.org> 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]:52820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XldS0-00036o-40 for bug-guix@gnu.org; Tue, 04 Nov 2014 07:43:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XldRu-0000o9-6u for bug-guix@gnu.org; Tue, 04 Nov 2014 07:43:08 -0500 Received: from debbugs.gnu.org ([140.186.70.43]:51126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XldRu-0000nz-3i for bug-guix@gnu.org; Tue, 04 Nov 2014 07:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XldRt-0003Ow-LW for bug-guix@gnu.org; Tue, 04 Nov 2014 07:43:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <874mugp6oj.fsf@gnu.org> 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 18926@debbugs.gnu.org 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 in= stall >>>> 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? 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/cma= ke. > > 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: By not providing "FindQt5Xdg.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Xdg", but CMake did not find one. Could not find a package configuration file provided by "Qt5Xdg" with any of the following names: Qt5XdgConfig.cmake qt5xdg-config.cmake Add the installation prefix of "Qt5Xdg" to CMAKE_PREFIX_PATH or set "Qt5Xdg_DIR" to a directory containing one of the above files. If "Qt5Xd= g" provides a separate development package or SDK, be sure it has been installed. Since FindQt5Xdg.cmake is not provided by upstream, it looks like we have t= o set CMAKE_PREFIX_PATH or Qt5Xdg_DIR. And if I understand correctly, at liblxqt side, since #:configure-flags can not refer inputs, I have to add a pre-configure phase, then using setenv. > >> 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. > >> and here is the packages I'm working on: > > Looks like a good start. :-) > > Thanks, > Ludo=E2=80=99.