diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-04-24 11:54:39 +0800 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-04-25 09:53:25 +0200 |
commit | 008e0b0a3979d6bafdc3cd394cb02e57a6552c1e (patch) | |
tree | a12408f9f16524053de61ff2a1f04793b28ae1d6 /meson.build | |
parent | 5a0f57aef7aa28c3c472b49e28690719a73ff710 (diff) |
Meson: Define _USE_MATH_DEFINES on Windows
Visual Studio and some MinGW versions require defining this to use M_PI
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 0448597..ee2d8dd 100644 --- a/meson.build +++ b/meson.build @@ -116,6 +116,11 @@ if is_msvc 'Visual Studio 2017 15.7 or later is required') endif +# Needed for M_PI on Visual Studio and some MinGW versions +if host_machine.system() == 'windows' + add_project_arguments('-D_USE_MATH_DEFINES', language: 'cpp') +endif + # Some dependencies are required only in maintainer mode and/or # if documentation shall be built. mm_common_get = find_program('mm-common-get', required: false) |