What is the recommended way to structure installation folders for a
relocatable installation for multiple platforms?

I'm looking for a structure that works with find_package module mode and
config mode; something like this:

    <install_prefix>/
      include/
        foo/
          foo.h
      lib/
        <PLAT x ARCH x CONFIG>/
          cmake/
            foo/
              FooConfig.cmake
          libFoo.a

Goal is:

 * libs can be co-installed for different platforms, architectures and
configs
 * includes can be shared
 * finding the includes should work in typical module mode searches
 * should just work with vanilla find_package(Foo REQUIRED), but for the
appropriate platform and arch.

Considering I'd be installing mostly 3rd party libraries here, if this can
be done by overriding the vars from GNUInstallDirs, it'd probably work for
many libraries. The rest I guess would either have to be edited or I just
give up and use separate installation dirs that include platform and arch.

I also cross posted on Stack Overflow:
https://stackoverflow.com/questions/51112173/whats-the-ideal-cmake-installation-directory-structure-for-a-relocatable-multip
-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to