From: Andreas Enge <andreas@enge.fr>
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: Sun, 1 Mar 2015 10:58:47 +0100 [thread overview]
Message-ID: <20150301095847.GA28759@debian> (raw)
In-Reply-To: <87vbjcp8xx.fsf@gnu.org>
The patch does not work. I thought this was due to it returning the .cmake
files themselves and not the directory containing them. Here, for instance,
it contains
/gnu/store/h30r6z3fc67h8557kd63vjjdlfpc58wj-libqtxdg-1.1.0/share/cmake/qt5xdg/qt5xdg-config.cmake
Inside the build directory, I tried an
export CMAKE_MODULE_PATH=/gnu/store/h30r6z3fc67h8557kd63vjjdlfpc58wj-libqtxdg-1.1.0/share/cmake/qt5xdg
with the same error message.
Then I followed the advice given on screen and set
export CMAKE_PREFIX_PATH=/gnu/store/h30r6z3fc67h8557kd63vjjdlfpc58wj-libqtxdg-1.1.0
which worked.
export Qt5Xdg_DIR=/gnu/store/h30r6z3fc67h8557kd63vjjdlfpc58wj-libqtxdg-1.1.0/share/cmake/qt5xdg
worked as well. But I do not see how to implement this kind of package
specific path in guix.
The following explains why CMAKE_MODULE_PATH has no effect here:
http://www.cmake.org/cmake/help/v3.0/command/find_package.html
Apparently, there is a "module mode" and a "config mode". The first one uses
CMAKE_MODULE_PATH and looks for files called FindPACKAGE.cmake. We are in the
second case here, where a file PACKAGEConfig.cmake or package-config.cmake
is looked for.
Further below on that page, it is explained where these config files are
looked for. On unix like systems, this is
<prefix>/(lib/<arch>|lib|share)/cmake/<name>*/
<prefix>/(lib/<arch>|lib|share)/<name>*/
<prefix>/(lib/<arch>|lib|share)/<name>*/(cmake|CMake)/
The <prefix> part can be set by CMAKE_PREFIX_PATH.
What would be desirable is the following:
In the definition of a search path, we need an additional transformation
(if it is not already there). We need to look for the regular expression
(.+)/(lib|lib64|share)/.+\.cmake$
or maybe
(.+)/(lib|lib/[^/]+|share)/.+\.cmake$
and put
\1
into CMAKE_PREFIX_PATH.
I think that would also make the lines
(setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
(setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH"))
in guix/build/cmake-build-system obsolete.
Concerning the "lib64" part, I still have doubts. The documentation speaks
of "lib/<arch>"; yet, there are packages which install into "lib64" (like
libqtxdg, needed for liblxqt, which triggered this discussion).
So if the suggestion above does not work, we can in a second step try
to play with CMAKE_INSTALL_LIBDIR.
Andreas
next prev parent reply other threads:[~2015-03-01 10:00 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 ` 宋文武
2015-01-04 17:06 ` Ludovic Courtès
2015-02-08 18:14 ` Ludovic Courtès
2015-03-01 9:58 ` Andreas Enge [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150301095847.GA28759@debian \
--to=andreas@enge.fr \
--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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.