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.
The problem is that in this case either of the two options must be true:
a) Software sets CMAKE_INSTALL_INCLUDEDIR to "include/$NAME" rather
than to "include" by default which "violates" the convention from
http://www.cmake.org/cmake/help/v2.8.12/cmake.html#module:GNUInstallDirs,
but leads to the desired behaviour.
b) Software sets CMAKE_INSTALL_INCLUDEDIR to "include" by default and
automatically adds "$NAME" to an internal variable when installing the
files. The drawback of this approach is that
-DCMAKE_INSTALL_INCLUDEDIR=include/$NAME/$VERSION
results in files being installed to
$prefix/include/$NAME/$VERSION/$NAME/*.h
and there is absolutely no way to change that.
What approach would you suggest to achieve the desired behaviour
without violating the conventions?
Thank you very much,
Mojca
--
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