This is an automated email from the ASF dual-hosted git repository.

asekretenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 6330a755ab40e2d771ba7f4fa5651281905c62b1
Author: Andrei Sekretenko <asekrete...@apache.org>
AuthorDate: Wed May 20 22:17:54 2020 +0200

    Added documentation for the cmake install target.
    
    Review: https://reviews.apache.org/r/72535
---
 docs/cmake.md               | 24 ++++++++++++++++++++++++
 docs/configuration/cmake.md | 15 +++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/docs/cmake.md b/docs/cmake.md
index 0a4482b..ee5d6dc 100644
--- a/docs/cmake.md
+++ b/docs/cmake.md
@@ -56,6 +56,30 @@ like usual. Similarly, if you configure with `-G Ninja` to 
use the Ninja
 generator, you can then run `ninja tests` to build the `tests` target with
 Ninja.
 
+# Installable build
+
+This example will build Mesos and install it into a custom prefix:
+```
+mkdir build && cd build
+cmake -DCMAKE_INSTALL_PREFIX=/home/current_user/mesos
+cmake --build . --target install
+```
+
+To produce a set of binaries and libraries that will work after being
+copied/moved to a different location, use `MESOS_FINAL_PREFIX`.
+On a build system:
+```
+mkdir build && cd build
+cmake -DMESOS_FINAL_PREFIX=/opt/mesos 
-DCMAKE_INSTALL_PREFIX=/home/current_user/mesos
+cmake --build . --target install
+tar -czf mesos.tar.gz mesos -C /home/current_user
+```
+On a target system:
+```
+sudo tar -xf mesos.tar.gz -C /opt
+sudo /opt/mesos/bin/mesos-agent --work-dir=/var/lib/mesos ...
+```
+
 # Supported options
 
 See [configuration options](configuration/cmake.md).
diff --git a/docs/configuration/cmake.md b/docs/configuration/cmake.md
index 35a017c..08d33dc 100644
--- a/docs/configuration/cmake.md
+++ b/docs/configuration/cmake.md
@@ -210,4 +210,19 @@ See more information in the [CMake 
documentation](../cmake.md).
       Enable use of the NVML headers. [default=TRUE]
     </td>
   </tr>
+  <tr>
+    <td>
+      -DMESOS_FINAL_PREFIX=[path]
+    </td>
+    <td>
+      Adjust built-in paths (rpath in shared objects, default paths in Mesos
+      flags and so on) so that cmake install output works after being copied
+      into this prefix. This path does not have to exist on the build system
+      (the system where cmake install is invoked).
+      This option is typically used by package managers that use different
+      prefixes on a build system and on a target system.
+      [default=`${CMAKE_INSTALL_PREFIX}`]
+    </td>
+  </tr>
+
 </table>

Reply via email to