[clutter/windows-fixes: 2/4] examples: Define _USE_MATH_DEFINES as needed
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/windows-fixes: 2/4] examples: Define _USE_MATH_DEFINES as needed
- Date: Wed, 20 Oct 2021 06:58:38 +0000 (UTC)
commit b377845cf3bb07c9296db779311db978876d0b4b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Oct 20 11:03:45 2021 +0800
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.
examples/meson.build | 7 +++++++
1 file changed, 7 insertions(+)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]