-
Notifications
You must be signed in to change notification settings - Fork 1
/
FetchGLAD.cmake
27 lines (24 loc) · 934 Bytes
/
FetchGLAD.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
include(SetSystemIncludes)
include(CompilerWarnings)
CPMAddPackage(
NAME glad
GITHUB_REPOSITORY Dav1dde/glad
GIT_TAG v0.1.34
OPTIONS
"GLAD_API gles2="
"GLAD_SPEC gl;egl"
"GLAD_PROFILE compatibility"
"GLAD_ALL_EXTENSIONS ON"
"GLAD_REPRODUCIBLE ON"
"GLAD_NO_LOADER OFF"
"GLAD_GENERATOR c"
EXCLUDE_FROM_ALL "YES"
)
source_group(TREE ${glad_SOURCE_DIR} FILES ${glad_SOURCES})
set_target_properties(glad PROPERTIES FOLDER dependencies)
set_target_properties(glad-generate-files PROPERTIES FOLDER dependencies)
set_target_includes_as_system(glad)
set_target_warnings_disabled(glad)
#Note: the GLAD generator doesn't seem to generate an OpenGL ES API on Github Action runners.
#If you don't have that issue due to using your own or different runners
# then I encourage you to use this cmake file rather than comitting the generated sources it to your repository