[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Proper behaviour and use of CMAKE_INSTALL_* variables
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2013-12-09 15:52:18
Message-ID: CAExHGmRoHiUL+=hFZ_YxvPRcqhP4g6uFWrxWFWGNB8WYWCh_9g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

On Mon, Dec 9, 2013 at 3:50 PM, Mojca Miklavec <
mojca.miklavec.lists@gmail.com> wrote:

> Dear list members,
>
> I often like or need to install two versions of the same software.
> Ideally the software should put its files by default to
>     $prefix/include/$NAME/*.h
>     $prefix/lib/$NAME/*.dylib
>     ...
> ($prefix => $CMAKE_INSTALL_PREFIX)
>
> and in order to be able to install multiple versions side-by-side I
> would like to be able to specify something like
>     -DCMAKE_INSTALL_INCLUDEDIR=include/$NAME/$VERSION
>     -DCMAKE_INSTALL_LIBDIR=lib/$NAME/$VERSION
> to end up with
>     $prefix/include/$NAME/$VERSION/*.h
>     $prefix/lib/$NAME/$VERSION/*.dylib
> instead of default paths.
>

Do you have any reasons that speak against using separate prefixes for each
version of that software? In particular since such a setup will make your
life harder when you want to use the installed software in some cmake-based
project. In that case you'd have to manually specify include-dir and
lib-dir when configuring the project since many find-modules simply expect
a 'standard' unix-like layout below the prefix under which they should
search for a given software. So they don't look into include/<version> or
lib/<version> so you'd need to specify that manually. Compared with the
ease of just specifying CMAKE_PREFIX_PATH to the installation directory for
the version you want thats a lot more effort each time you setup a build
directory.

Andreas

[Attachment #5 (text/html)]

<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec \
9, 2013 at 3:50 PM, Mojca Miklavec <span dir="ltr">&lt;<a \
href="mailto:mojca.miklavec.lists@gmail.com" \
target="_blank">mojca.miklavec.lists@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Dear list members,<br> <br>
I often like or need to install two versions of the same software.<br>
Ideally the software should put its files by default to<br>
    $prefix/include/$NAME/*.h<br>
    $prefix/lib/$NAME/*.dylib<br>
    ...<br>
($prefix =&gt; $CMAKE_INSTALL_PREFIX)<br>
<br>
and in order to be able to install multiple versions side-by-side I<br>
would like to be able to specify something like<br>
    -DCMAKE_INSTALL_INCLUDEDIR=include/$NAME/$VERSION<br>
    -DCMAKE_INSTALL_LIBDIR=lib/$NAME/$VERSION<br>
to end up with<br>
    $prefix/include/$NAME/$VERSION/*.h<br>
    $prefix/lib/$NAME/$VERSION/*.dylib<br>
instead of default paths.<br></blockquote><div><br></div><div>Do you have any reasons \
that speak against using separate prefixes for each version of that software? In \
particular since such a setup will make your life harder when you want to use the \
installed software in some cmake-based project. In that case you&#39;d have to \
manually specify include-dir and lib-dir when configuring the project since many \
find-modules simply expect a &#39;standard&#39; unix-like layout below the prefix \
under which they should search for a given software. So they don&#39;t look into \
include/&lt;version&gt; or lib/&lt;version&gt; so you&#39;d need to specify that \
manually. Compared with the ease of just specifying CMAKE_PREFIX_PATH to the \
installation directory for the version you want thats a lot more effort each time you \
setup a build directory.</div> <div><br></div><div>Andreas \
</div><div><br></div></div></div></div>



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic