Tue, 15 Mar 2022 18:56:02 +0200
Add missing svg icon
| 29 | 1 | # |
| 2 | # Find GLM | |
| 3 | # | |
| 4 | # Try to find GLM : OpenGL Mathematics. | |
| 5 | # This module defines | |
| 6 | # - GLM_INCLUDE_DIRS | |
| 7 | # - GLM_FOUND | |
| 8 | # | |
| 9 | # The following variables can be set as arguments for the module. | |
| 10 | # - GLM_ROOT_DIR : Root library directory of GLM | |
| 11 | # | |
| 12 | # References: | |
| 13 | # - https://github.com/Groovounet/glm/blob/master/util/FindGLM.cmake | |
| 14 | # - https://bitbucket.org/alfonse/gltut/src/28636298c1c0/glm-0.9.0.7/FindGLM.cmake | |
| 15 | # | |
| 16 | ||
| 17 | # Additional modules | |
| 18 | include(FindPackageHandleStandardArgs) | |
| 19 | ||
| 20 | if (WIN32) | |
| 21 | # Find include files | |
| 22 | find_path( | |
| 23 | GLM_INCLUDE_DIR | |
| 24 | NAMES glm/glm.hpp | |
| 25 | PATHS | |
| 26 | $ENV{PROGRAMFILES}/include | |
| 27 | ${GLM_ROOT_DIR}/include | |
| 28 | DOC "The directory where glm/glm.hpp resides") | |
| 29 | else() | |
| 30 | # Find include files | |
| 31 | find_path( | |
| 32 | GLM_INCLUDE_DIR | |
| 33 | NAMES glm/glm.hpp | |
| 34 | PATHS | |
| 35 | /usr/include | |
| 36 | /usr/local/include | |
| 37 | /sw/include | |
| 38 | /opt/local/include | |
| 39 | ${GLM_ROOT_DIR}/include | |
| 40 | DOC "The directory where glm/glm.hpp resides") | |
| 41 | endif() | |
| 42 | ||
| 43 | # Handle REQUIRD argument, define *_FOUND variable | |
| 44 | find_package_handle_standard_args(GLM DEFAULT_MSG GLM_INCLUDE_DIR) | |
| 45 | ||
| 46 | # Define GLM_INCLUDE_DIRS | |
| 47 | if (GLM_FOUND) | |
| 48 | set(GLM_INCLUDE_DIRS ${GLM_INCLUDE_DIR}) | |
| 49 | endif() | |
| 50 | ||
| 51 | # Hide some variables | |
| 52 | mark_as_advanced(GLM_INCLUDE_DIR) |