Skip to content

Commit 74eb1fc

Browse files
committed
meson: add workaround for platforms where 'glm' has no glm.pc file
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
1 parent d404f2d commit 74eb1fc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

meson.build

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,23 @@ elif nvcc_name == 'nvcc'
9292
]
9393
endif
9494

95+
if enable_opengl
96+
glm_dep = dependency('glm', required: false)
97+
if not glm_dep.found()
98+
if cc.has_header('glm/glm.hpp')
99+
glm_dep = declare_dependency()
100+
else
101+
error('GLM not found: no pkg-config (glm.pc) and header <glm/glm.hpp> missing')
102+
endif
103+
endif
104+
endif
105+
95106
extra_deps = []
96107

97108
if enable_opengl
98109
extra_deps += [
99110
dependency('glew'),
100-
dependency('glm'),
111+
glm_dep,
101112
dependency('sdl2'),
102113
dependency('gl'),
103114
]

0 commit comments

Comments
 (0)