Update manual to reflect changes

This commit is contained in:
Krzysztof Kurek 2021-01-31 14:10:15 +01:00
parent 5797373dc2
commit dd457459b2
No known key found for this signature in database
GPG Key ID: 04CCC8030ECE248C

View File

@ -277,18 +277,27 @@ GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/
### <a name="section1_5"></a> 1.5. Finding GLM with CMake ### <a name="section1_5"></a> 1.5. Finding GLM with CMake
GLM provides the CMake package configuration files `glmConfig.cmake` and `glmConfig-version.cmake`. When installed, GLM provides the CMake package configuration files `glmConfig.cmake` and `glmConfigVersion.cmake`.
To use these configurations files, you may need to set the `glm_DIR` variable to the directory containing the configuration files `<path to glm root>/cmake/glm/`. To use these configurations files, you may need to set the `glm_DIR` variable to the directory containing the configuration files `<installation prefix>/lib/cmake/glm/`.
Use the `find_package` CMake command to load the configurations into your project. Lastly, either link your executable against the `glm::glm` target or add `${GLM_INCLUDE_DIRS}` to your target's include directories: Use the `find_package` CMake command to load the configurations into your project. Lastly, either link your executable against the `glm::glm` target or add `${GLM_INCLUDE_DIRS}` to your target's include directories:
```cmake ```cmake
set(glm_DIR <path to glm root>/cmake/glm) # if necessary set(glm_DIR <installation prefix>/lib/cmake/glm) # if necessary
find_package(glm REQUIRED) find_package(glm REQUIRED)
target_link_libraries(<your executable> glm::glm) target_link_libraries(<your executable> glm::glm)
``` ```
To use GLM as a submodule in a project instead, use `add_subdirectory` to expose the same target, or add the directory to your target's
```cmake
add_subdirectory(glm)
target_link_libraries(<your executable> glm::glm)
# or
target_include_directories(<your executable> glm)
```
--- ---
<div style="page-break-after: always;"> </div> <div style="page-break-after: always;"> </div>