unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: 宋文武 <iyzsong@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 18926@debbugs.gnu.org
Subject: bug#18926: cmake-build-system should set CMAKE_INSTALL_LIBDIR and CMAKE_PREFIX_PATH
Date: Tue, 04 Nov 2014 20:42:47 +0800	[thread overview]
Message-ID: <871tpjb0hk.fsf@gmail.com> (raw)
In-Reply-To: <874mugp6oj.fsf@gnu.org>

Ludovic Courtès <ludo@gnu.org> writes:

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> 宋文武 <iyzsong@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:

  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 "Qt5Xdg"
  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 to 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’.

  reply	other threads:[~2014-11-04 12:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02 13:24 bug#18926: cmake-build-system should set CMAKE_INSTALL_LIBDIR and CMAKE_PREFIX_PATH 宋文武
2014-11-02 22:55 ` Ludovic Courtès
2014-11-03 13:44   ` 宋文武
2014-11-03 16:53     ` Ludovic Courtès
2014-11-04 12:42       ` 宋文武 [this message]
2015-01-04 17:06         ` Ludovic Courtès
2015-02-08 18:14           ` Ludovic Courtès
2015-03-01  9:58             ` Andreas Enge
2015-03-01 14:35               ` Ludovic Courtès
2015-03-01 20:11                 ` Andreas Enge
2015-03-14 15:11                   ` Andreas Enge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tpjb0hk.fsf@gmail.com \
    --to=iyzsong@gmail.com \
    --cc=18926@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).