[libgda] meson: fixed postgres, capi, raw generation
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] meson: fixed postgres, capi, raw generation
- Date: Fri, 22 Jun 2018 18:47:34 +0000 (UTC)
commit edd2e239ede36569adf2b148873eaa012dc7fe22
Author: Daniel Espinosa <esodan gmail com>
Date: Fri Jun 22 12:55:17 2018 -0500
meson: fixed postgres, capi, raw generation
Fixed a segfault for SQLite provider
libgda/sqlite/gda-sqlite-provider.c | 2 +-
providers/postgres/meson.build | 10 ++---
providers/skel-implementation/capi/meson.build | 52 +++++++++++++++++++++-----
3 files changed, 48 insertions(+), 16 deletions(-)
---
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index 468a64ec4..5e98eb0aa 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -1220,7 +1220,7 @@ gda_sqlite_provider_render_operation (GdaServerProvider *provider, GdaConnection
g_free (dir);
if (! file) {
- gchar *res = g_strconcat ("/spec/" PNAME, str);
+ gchar *res = g_strconcat ("/spec/" PNAME, str, NULL);
GBytes *contents;
contents = g_resources_lookup_data (res,
G_RESOURCE_LOOKUP_FLAGS_NONE,
diff --git a/providers/postgres/meson.build b/providers/postgres/meson.build
index 927677f1b..21bc52351 100644
--- a/providers/postgres/meson.build
+++ b/providers/postgres/meson.build
@@ -45,9 +45,9 @@ foreach xt : postgres_xml_fnames
)
endforeach
-xml_res = []
+postgres_xml_res = []
foreach xrp : postgres_xml_fnames
- xml_res += custom_target(xrp+'.raw.xml',
+ postgres_xml_res += custom_target(xrp+'.raw.xml',
command: [raw_spec,
'-o', meson.current_build_dir(),
'@INPUT@'
@@ -60,7 +60,6 @@ endforeach
postgres_resourcesc = custom_target('postgres_resourcesc',
command: [compile_resources,
'--sourcedir='+meson.current_build_dir(),
- '--sourcedir='+join_paths(meson.source_root(),'providers','postgres'),
'--generate-source',
'--target', '@OUTPUT@',
'--internal',
@@ -68,14 +67,13 @@ postgres_resourcesc = custom_target('postgres_resourcesc',
],
input: 'postgres.gresource.xml',
output: 'postgres_resource.c',
- depends: xml_res,
+ depends: postgres_xml_res,
install: false
)
postgres_resourcesh = custom_target('postgres_resourcesh',
command: [compile_resources,
'--sourcedir='+meson.current_build_dir(),
- '--sourcedir='+join_paths(meson.source_root(),'providers','postgres'),
'--generate-header',
'--target', '@OUTPUT@',
'--internal',
@@ -83,7 +81,7 @@ postgres_resourcesh = custom_target('postgres_resourcesh',
],
input: 'postgres.gresource.xml',
output: 'postgres_resource.h',
- depends: xml_res,
+ depends: postgres_xml_res,
install: false
)
postgres_resources = []
diff --git a/providers/skel-implementation/capi/meson.build b/providers/skel-implementation/capi/meson.build
index cdd52a0b6..8bff8bc8e 100644
--- a/providers/skel-implementation/capi/meson.build
+++ b/providers/skel-implementation/capi/meson.build
@@ -31,19 +31,52 @@ foreach xt : capi_xml_fnames
)
endforeach
-foreach xr : capi_xml_fnames
- tc = configuration_data()
- configure_file(
- copy: true,
- input: xr+'.xml.in',
- output: xr+'.raw.xml',
- configuration: tc
+capi_xml_res = []
+foreach xrc : capi_xml_fnames
+ capi_xml_res += custom_target(xrc+'.raw.xml',
+ command: [raw_spec,
+ '-o', meson.current_build_dir(),
+ '@INPUT@'
+ ],
+ input: xrc+'.xml.in',
+ output: xrc+'.raw.xml',
)
endforeach
-capi_resources = gnome_module.compile_resources('capi_resources', 'capi.gresource.xml',
- source_dir: meson.current_build_dir()
+
+capi_resourcesc = custom_target('capi_resourcesc',
+ command: [compile_resources,
+ '--sourcedir='+meson.current_build_dir(),
+ '--sourcedir='+join_paths(meson.source_root(),'providers','capi'),
+ '--generate-source',
+ '--target', '@OUTPUT@',
+ '--internal',
+ '@INPUT@'
+ ],
+ input: 'capi.gresource.xml',
+ output: 'capi_resource.c',
+ depends: capi_xml_res,
+ install: false
+ )
+
+capi_resourcesh = custom_target('capi_resourcesh',
+ command: [compile_resources,
+ '--sourcedir='+meson.current_build_dir(),
+ '--sourcedir='+join_paths(meson.source_root(),'providers','capi'),
+ '--generate-header',
+ '--target', '@OUTPUT@',
+ '--internal',
+ '@INPUT@'
+ ],
+ input: 'capi.gresource.xml',
+ output: 'capi_resource.h',
+ depends: capi_xml_res,
+ install: false
)
+capi_resources = []
+capi_resources += capi_resourcesc
+capi_resources += capi_resourcesh
+
libgda_capi_sources = files([
'gda-capi-blob-op.c',
@@ -63,6 +96,7 @@ libgda_capi_sources = files([
'gda-capi.h',
'libmain.c',
])
+libgda_capi_sources += capi_resources
conf = configuration_data()
conf.set_quoted('GDA_ABI_MAJOR_VERSION', MAJOR_VERSION)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]