forked from StableCoder/cmake-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindglm.cmake
40 lines (26 loc) · 1.07 KB
/
Findglm.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#[=======================================================================[.rst:
Findglm
----------
OpenGL Mathematics (GLM) is a header only C++ mathematics library for
graphics software based on the OpenGL Shading Language (GLSL) specifications.
https://glm.g-truc.net/
INTERFACE Targets
^^^^^^^^^^^^^^^^^
This module defines the `INTERFACE` target ``glm``, if the glm header
glm/glm.hpp has been found.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables::
glm_FOUND - "True" if glm was found
glm_INCLUDE_DIRS - include directories for glm
The module will also define these cache variables::
glm_INCLUDE_DIR - the glm include directory
#]=======================================================================]
find_path(glm_INCLUDE_DIR NAMES glm/glm.hpp)
set(glm_INCLUDE_DIRS ${glm_INCLUDE_DIR})
find_package_handle_standard_args(glm DEFAULT_MSG glm_INCLUDE_DIR)
mark_as_advanced(glm_INCLUDE_DIR)
if(glm_FOUND AND NOT TARGET glm)
add_library(glm INTERFACE)
target_include_directories(glm INTERFACE ${glm_INCLUDE_DIRS})
endif()