diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:38:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:38:23 +0000 |
commit | ff6e3c025658a5fa1affd094f220b623e7e1b24b (patch) | |
tree | 9faab72d69c92d24e349d184f5869b9796f17e0c /src/opengl/include/glad | |
parent | Initial commit. (diff) | |
download | libplacebo-upstream.tar.xz libplacebo-upstream.zip |
Adding upstream version 6.338.2.upstream/6.338.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/opengl/include/glad/meson.build | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/opengl/include/glad/meson.build b/src/opengl/include/glad/meson.build new file mode 100644 index 0000000..05b3f02 --- /dev/null +++ b/src/opengl/include/glad/meson.build @@ -0,0 +1,29 @@ +glad_check = run_command([ python, '-c', 'import glad; print(glad.__version__)' ], + env: python_env, + capture: true, + check: false, +) + +glad_ver = glad_check.returncode() == 0 ? glad_check.stdout().strip() : 'none' +glad_req = '>= 2.0' + +if not glad_ver.version_compare(glad_req) + error(f'glad (required: @glad_req@, found: @glad_ver@) was not found in ' + + 'PYTHONPATH or `3rdparty`. Please run `git submodule update --init` ' + + 'followed by `meson --wipe`.') +endif + +glad = custom_target('gl.h', + output: 'gl.h', + env: python_env, + command: [ + python, '-m', 'glad', '--out-path=@OUTDIR@/../../', + '--reproducible', '--merge', '--api=gl:core,gles2,egl', + '--extensions=' + ','.join(gl_extensions), 'c', '--header-only', '--mx' + ] + (opengl_link.allowed() ? ['--loader'] : []) +) + +glad_dep = declare_dependency( + include_directories: include_directories('..'), + sources: glad, +) |