[Dune-devel] Install location of CMake modules
Ansgar Burchardt
burchardt at igpm.rwth-aachen.de
Mon Jan 6 16:11:33 CET 2014
On 01/03/2014 03:40 PM, Markus Blatt wrote:
> On Fri, Jan 03, 2014 at 02:33:01PM +0100, Ansgar Burchardt wrote:
>> I noticed DUNE want to ship CMake modules in ${prefix}/share/cmake/modules if
>> installed system-wide. As they have quite generic names such as
>> "FindInkscape.cmake" or "UseLATEX.cmake", I wonder if they should go
>> into a directory specific for DUNE instead, for example into
>> ${prefix}/share/dune/cmake/modules[1].
>
> You are totally right.
>
>> However I'm not sure how cmake is supposed to find them. Does it involve
>> dune-common-config.cmake.in?
>
> It finds them via the location given by dune-common and that involves dune-common-config.cmake.in.
So I guess dune-common-config.cmake should be installed in a location
that cmake looks into by default.
> BTW: there are aome issues where I could use some insight from a
> Debian expert, like you are one:
>
> For the debian packages the pkg-config files are installed into
> $prefix/lib/$multi-arch/pkconfig. This makes perfect sense as the
> information includes libraries which differ between architectures.
> I assume that the same should happen for the installation of the
> dune-common-config.cmake files as these contain similar
> information.
>
> Questions:
> - Shouldn't this approach also be used for the installation with
> autotools?
For the Debian packages, yes. But not for other systems as they don't
use multi-arch directories.
Debian's build system passes the right value to configure via --libdir.
So just using this should be fine.
> - Is there a generic way to get/guess these multi-arch values?
> (On my system the value is x86_64-linux-gnu. I get x86_64 using
> uname -m and construct linux-gnu from the GNU/Linux that I get
> from uname -s and uname -o. Not sure whether this is really
> generic, though)
uname isn't really helpful as you can run a 64bit kernel on a 32bit
system. It also doesn't work when cross-compiling (which some people try
to use for Debian packages).
On Debian systems, gcc or dpkg-architecture can be used to query the
multi-arch tripel:
$ gcc -print-multiarch
x86_64-linux-gnu
$ dpkg-architecture -qDEB_HOST_MULTIARCH
x86_64-linux-gnu
(Note that I always confuse DEB_HOST_* and DEB_BUILD_*.) I think it is
also available in cmake as CMAKE_LIBRARY_ARCHITECTURE.
However packages shouldn't need to use these at runtime and get the
right value passed at build time.
Ansgar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20140106/f8963a9c/attachment.sig>
More information about the Dune-devel
mailing list