summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorFujii Hironori <Hironori.Fujii@sony.com>2023-01-12 06:57:51 +0900
committerFujii Hironori <Hironori.Fujii@sony.com>2023-01-13 05:47:03 +0900
commit8520ef522168882b602efa6c322592e0fe56689f (patch)
tree11451d417183fce2d8235c4f72900473e6e677d1 /meson.build
parent1e0249ae0d2731043798da8616f2980f1c5328cf (diff)
downloadcairo-8520ef522168882b602efa6c322592e0fe56689f.tar.gz
Defining Windows version macros in meson.build
WINVER and _WIN32_WINNT macros were defined in each source files and headers that were including <windows.h>. However, because DirectWrite requires new Windows API, some files included <windows.h> without the version macros. This inconsistency sometimes caused troubles. Define the version macros in meson.build.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 4dedeadee..fb5fd3a49 100644
--- a/meson.build
+++ b/meson.build
@@ -495,6 +495,8 @@ if host_machine.system() == 'darwin' and not get_option('quartz').disabled()
endif
if host_machine.system() == 'windows'
+ add_project_arguments('-DWIN32_LEAN_AND_MEAN', '-DNOMINMAX', language: ['c', 'cpp'])
+
win32_extra_deps = [
cc.find_library('gdi32'),
cc.find_library('msimg32'),
@@ -545,6 +547,10 @@ if host_machine.system() == 'windows'
if cpp_compiler.has_header('dwrite_3.h') and cpp_compiler.get_define('__MINGW32__') == ''
conf.set('HAVE_DWRITE_3_H', 1)
endif
+
+ add_project_arguments('-DWINVER=_WIN32_WINNT_WIN10', '-D_WIN32_WINNT=_WIN32_WINNT_WIN10', '-DNTDDI_VERSION=NTDDI_WIN10_RS3', language: ['c', 'cpp'])
+ else
+ add_project_arguments('-DWINVER=_WIN32_WINNT_WIN2K', '-D_WIN32_WINNT=_WIN32_WINNT_WIN2K', language: ['c', 'cpp'])
endif
endif