[gobject-introspection/wip/tingping/meson: 2/4] Windows: compile with /DYY_NO_UNISTD_H
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/tingping/meson: 2/4] Windows: compile with /DYY_NO_UNISTD_H
- Date: Thu, 26 Oct 2017 13:23:20 +0000 (UTC)
commit 4e76f6b12a188238f3b77bdbe4d50b2988723a28
Author: Danny 'Guru' Forghieri <daniele forghieri gmail com>
Date: Wed Oct 25 23:09:09 2017 +0200
Windows: compile with /DYY_NO_UNISTD_H
giscanner/meson.build | 6 ++++++
meson.build | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/meson.build b/giscanner/meson.build
index 3bc4d01..3b48685 100644
--- a/giscanner/meson.build
+++ b/giscanner/meson.build
@@ -53,12 +53,18 @@ scannerlexer = custom_target('scannerlexer',
command: [flex, '-o', '@OUTPUT@', '@INPUT@']
)
+giscanner_args = []
+if not cc.has_header('unistd.h')
+ giscanner_args += '-DYY_NO_UNISTD_H'
+endif
+
giscanner_lib = static_library('giscanner',
sources: [
'sourcescanner.c',
scannerparser,
scannerlexer,
],
+ c_args: giscanner_args,
dependencies: gio_dep,
)
diff --git a/meson.build b/meson.build
index 069f45c..378ffcf 100644
--- a/meson.build
+++ b/meson.build
@@ -31,7 +31,7 @@ configure_file(
add_project_arguments([
'-I' + meson.build_root(),
'-DHAVE_CONFIG_H',
- ] language: 'c',
+ ], language: 'c',
)
gi_hidden_visibility_cflags = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]