summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-11-28 17:52:12 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-10 19:05:19 +0530
commit3adde9ea4015de7d38490134f37c2ba07bc4133c (patch)
tree09fcb05aadf20965b235a19e01e356ad804a4b66
parente1f45a0cfa67540e0f8b23876daba2f8e19ee9c6 (diff)
downloadgobject-introspection-3adde9ea4015de7d38490134f37c2ba07bc4133c.tar.gz
meson: Fix including of config.h
We must use include_directories: to pass that so that it's not overriden by include paths from internal dependencies which will very commonly also have their own config.h in one of their include paths.
-rw-r--r--giscanner/meson.build2
-rw-r--r--meson.build6
2 files changed, 3 insertions, 5 deletions
diff --git a/giscanner/meson.build b/giscanner/meson.build
index dc166f5a..006722d2 100644
--- a/giscanner/meson.build
+++ b/giscanner/meson.build
@@ -69,12 +69,14 @@ giscanner_lib = static_library('giscanner',
scannerlexer,
],
c_args: giscanner_args,
+ include_directories : configinc,
dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
)
giscanner_pymod = py3.extension_module('_giscanner', 'giscannermodule.c',
link_with: giscanner_lib,
c_args: [gi_hidden_visibility_cflags],
+ include_directories : configinc,
dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep,
dependency('python3')],
install: true,
diff --git a/meson.build b/meson.build
index 95375c83..acb4c8e9 100644
--- a/meson.build
+++ b/meson.build
@@ -29,11 +29,7 @@ foreach type : ['char', 'short', 'int', 'long']
config.set('SIZEOF_@0@'.format(type.to_upper()), size)
endforeach
-add_project_arguments([
- '-I' + meson.build_root(),
- '-DHAVE_CONFIG_H',
- ], language: 'c',
-)
+add_project_arguments(['-DHAVE_CONFIG_H'], language: 'c')
gi_hidden_visibility_cflags = []
if host_machine.system() == 'windows'