diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-10-20 11:03:45 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-10-20 11:03:45 +0800 |
commit | b377845cf3bb07c9296db779311db978876d0b4b (patch) | |
tree | 746c07c956d56314d2d8e75a2d1e2103876ef368 /examples/meson.build | |
parent | fce681d3617b2e410d05404a057de57f71c77783 (diff) | |
download | clutter-b377845cf3bb07c9296db779311db978876d0b4b.tar.gz |
examples: Define _USE_MATH_DEFINES as needed
For builds using the Visual Studio headers, we must define
_USE_MATH_DEFINES in order for _M_PI to work.
Diffstat (limited to 'examples/meson.build')
-rw-r--r-- | examples/meson.build | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/meson.build b/examples/meson.build index 532e9bb21..256168945 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -32,10 +32,17 @@ if enable_pixbuf_tests ] endif +examples_cargs = [] + +if cc.get_argument_syntax() == 'msvc' + examples_cargs += '-D_USE_MATH_DEFINES' +endif + foreach e: examples executable( e, e + '.c', dependencies: examples_deps, + c_args: examples_cargs, ) endforeach |