Forrest logo
back to the cmake tool

cmake:tldr:4f572

cmake: Install the build artifacts using the custom prefix for paths.
$ cmake --install ${path-to-build_directory} --strip --prefix ${path-to-directory}
try on your machine

The "cmake --install" command is used to install the output files generated by CMake after building a project.

Here is the breakdown of the different parts of the command:

  1. "cmake": It is the command to run the CMake tool.

  2. "--install": This option in CMake specifies that we want to install the built files.

  3. "${path-to-build_directory}": It specifies the path to the build directory where CMake generated the build files, including the binaries and other build artifacts.

  4. "--strip": This option tells CMake to strip debug symbols from installed binary files, reducing their size.

  5. "--prefix ${path-to-directory}": This option sets the installation prefix or the base directory where the files will be installed. The "${path-to-directory}" should be replaced with the desired path where you want to install the project.

Overall, this command will take the files from the specified build directory and install them into the provided installation prefix directory, while also stripping debug symbols from the installed binaries if the "--strip" option is used.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the cmake tool