add info about installation

This commit is contained in:
Francisco Pombal 2021-06-24 01:17:26 +01:00
parent 63a0d238ef
commit 99c7b8fabd

View File

@ -174,4 +174,22 @@ In some systems, CMake may find them automatically in your standard system insta
In others, you may need to supply hints in the form of options passed in the **configure step** to tell CMake where to find some packages. In others, you may need to supply hints in the form of options passed in the **configure step** to tell CMake where to find some packages.
For example, if CMake fails the **configure step** complaining that it can't find OpenSSL on Windows, you need to pass `-DOPENSSL_ROOT_DIR=C:\path\to\OpenSSL_root_directory` in the **configure step**. For example, if CMake fails the **configure step** complaining that it can't find OpenSSL on Windows, you need to pass `-DOPENSSL_ROOT_DIR=C:\path\to\OpenSSL_root_directory` in the **configure step**.
CMake usually tells you what exactly it wants and the name of the variable to pass it as. CMake usually tells you what exactly it wants and the name of the variable to pass it as.
### Installation and stripping binaries
You can run the executable from the build directory, but you also may want to install the build artifacts into system directories.
This can be done with (you may need elevated privileges, depending on the install destination):
```
cmake --install build_dir
```
The install destination can be controlled via the `CMAKE_INSTALL_PREFIX` variable at **configure-time**.
CMake does not strip binaries by default. To install stripped binaries, pass the `--strip` flag to the install command:
```
make --install build_dir --strip
```