[jsonrpc-glib: 1/2] Use include_directories for config_h



commit c1e1463f740774019419e063894b0fc350a7f58d
Author: Princeton Ferro <princetonferro gmail com>
Date:   Sat Mar 7 07:43:58 2020 -0500

    Use include_directories for config_h
    
    - This allows jsonrpc-glib to be built as a Meson subproject
    - See https://github.com/mesonbuild/meson/issues/2548

 meson.build     | 3 ++-
 src/meson.build | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index e541a05..ee84f28 100644
--- a/meson.build
+++ b/meson.build
@@ -32,9 +32,10 @@ config_h = configuration_data()
 config_h.set_quoted('GETTEXT_PACKAGE', 'libjsonrpc_glib')
 config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
 
+internal_inc = include_directories('.')
+
 add_project_arguments([
   '-DHAVE_CONFIG_H',
-  '-I' + meson.build_root(),
   '-DJSONRPC_GLIB_COMPILATION',
 ], language: 'c')
 
diff --git a/src/meson.build b/src/meson.build
index 62cad0d..6814baa 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -58,6 +58,7 @@ libjsonrpc_glib_sources = [
 libjsonrpc_glib = library(
   'jsonrpc-glib-' + apiversion,
   libjsonrpc_glib_sources,
+  include_directories: internal_inc,
 
          c_args: hidden_visibility_args + release_args,
    dependencies: libjsonrpc_glib_deps,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]