vertex_engine/subprojects/glfw-3.3.7/examples/meson.build

38 lines
1.0 KiB
Meson
Raw Normal View History

2024-05-15 19:21:04 +03:00
### GLFW examples
#@ Constants
ex_include = include_directories('../include', '../src', '../deps')
glad_gl = '../deps/glad_gl.c'
getopt = '../deps/getopt.c'
tinycthread = '../deps/tinycthread.c'
#@ Flags
c_flags = []
if is_posix
c_flags += '-D_XOPEN_SOURCE=700'
endif
if host_machine.system() == 'darwin'
c_flags += '-D_DARWIN_C_SOURCE'
endif
#@ Example executables
examples = [['offscreen', glad_gl],
['boing', glad_gl],
['gears', glad_gl],
['heightmap', glad_gl],
['particles', [tinycthread, getopt, glad_gl]],
['sharing', glad_gl],
['simple', glad_gl],
['splitview', glad_gl],
['wave', glad_gl]]
foreach e : examples
name = e[0]
src = [e[0] + '.c', e[1]]
executable(name, src,
include_directories : ex_include,
c_args : c_flags,
dependencies : [glfw_dep, deps],
build_by_default : true,
install : get_option('install'),
install_dir : opt_libdir / 'GLFW' / 'examples')
endforeach