GNU bug report logs - #18926
cmake-build-system should set CMAKE_INSTALL_LIBDIR and CMAKE_PREFIX_PATH

Previous Next

Package: guix;

Reported by: 宋文武 <iyzsong <at> gmail.com>

Date: Sun, 2 Nov 2014 16:58:01 UTC

Severity: normal

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 18926 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: 宋文武 <iyzsong <at> gmail.com>
Cc: 18926 <at> debbugs.gnu.org
Subject: Re: bug#18926: cmake-build-system should set CMAKE_INSTALL_LIBDIR and
 CMAKE_PREFIX_PATH
Date: Sun, 04 Jan 2015 18:06:26 +0100
宋文武 <iyzsong <at> gmail.com> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> 宋文武 <iyzsong <at> gmail.com> skribis:
>>
>>> Ludovic Courtès <ludo <at> gnu.org> writes:
>>>
>>>> 宋文武 <iyzsong <at> gmail.com> skribis:
>>>>
>>>>> if CMAKE_INSTALL_LIBDIR not set to `lib`, GNUInstallDirs.cmake will install
>>>>> 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=lib doesn’t 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=lib.  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’re talking about .cmake files, right?
>>> yes, but now I find out that they can under both lib/cmake and share/cmake.
>>
>> 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. ---’
>>
>> 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 ‘core-updates’ it’s 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’.




This bug report was last modified 10 years and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.