[tracker] build: Unbreak meson build



commit e10fbf332b809cb479e6237455b00bfcbd14a7ed
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jul 19 13:08:15 2017 +0200

    build: Unbreak meson build
    
    The change in 1b31260292 added somewhat clumsy meson support. The
    C-side vapi is now required by the Vala-side vapi, but only the latter
    is included when building the rest of the libraries. Since we can't
    tell the build to ditch the vala vapi and include our merged/spiced up
    tracker-sparql-2.0.vapi file, add a dependency on the C vapi that we can
    add on the selected places.
    
    A side effect of including the unfixed vapis is that includes point
    to internal files, so make sure everything gets TRACKER_COMPILATION
    when building to circumvent it.

 meson.build                               |    1 +
 src/libtracker-sparql-backend/meson.build |    4 ++--
 src/libtracker-sparql/meson.build         |    3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 71d517a..b07cbb0 100644
--- a/meson.build
+++ b/meson.build
@@ -76,6 +76,7 @@ uuid = cc.find_library('uuid')
 # There are various gchar vs. unsigned char warnings that occur in extract
 # modules, it's not worth adding casts everywhere so we disable the warning.
 add_project_arguments('-Wno-pointer-sign', language: 'c')
+add_project_arguments('-DTRACKER_COMPILATION', language: 'c')
 
 enable_fts = get_option('fts')
 enable_extract = get_option('extract')
diff --git a/src/libtracker-sparql-backend/meson.build b/src/libtracker-sparql-backend/meson.build
index a46d61b..b4b3d3b 100644
--- a/src/libtracker-sparql-backend/meson.build
+++ b/src/libtracker-sparql-backend/meson.build
@@ -14,13 +14,13 @@ libtracker_sparql = library('tracker-sparql-' + tracker_api_version,
     # https://github.com/mesonbuild/meson/pull/2030
     link_with: libtracker_sparql_intermediate_vala,
 
-    dependencies: [tracker_common_dep, tracker_sparql_remote_dep, tracker_sparql_bus_dep, 
tracker_sparql_direct_dep],
+    dependencies: [tracker_common_dep, tracker_sparql_remote_dep, tracker_sparql_bus_dep, 
tracker_sparql_direct_dep, libtracker_sparql_c_vapi_dep],
 )
 
 tracker_sparql_dep = declare_dependency(
     link_with: [libtracker_sparql, libtracker_sparql_intermediate_vala],
     include_directories: srcinc,
-    dependencies: [tracker_common_dep],
+    dependencies: [tracker_common_dep, libtracker_sparql_c_vapi_dep],
     include_directories: srcinc,
 )
 
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
index a326c2e..b4af625 100644
--- a/src/libtracker-sparql/meson.build
+++ b/src/libtracker-sparql/meson.build
@@ -11,6 +11,7 @@ tracker_sparql_intermediate_dependencies = [uuid]
 
 # First build the Vala parts ...
 libtracker_sparql_c_vapi = files('libtracker-sparql-intermediate-c.vapi')
+libtracker_sparql_c_vapi_dep = meson.get_compiler('vala').find_library('libtracker-sparql-intermediate-c', 
dirs: meson.current_source_dir())
 
 libtracker_sparql_intermediate_vala = static_library('tracker-sparql-intermediate-vala',
     'tracker-namespace.vala',
@@ -81,7 +82,7 @@ tracker_sparql_intermediate_dep = declare_dependency(
     link_with: [libtracker_sparql_intermediate_c, libtracker_sparql_intermediate_vala],
     sources: tracker_sparql_generated_header,
     include_directories: [srcinc, include_directories('.')],
-    dependencies: tracker_sparql_intermediate_dependencies
+    dependencies: [ tracker_sparql_intermediate_dependencies, libtracker_sparql_c_vapi_dep ],
 )
 
 configure_file(


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