Commit e10fbf33 authored by Carlos Garnacho's avatar Carlos Garnacho

build: Unbreak meson build

The change in 1b312602 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.
parent 2957dd7d
......@@ -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')
......
......@@ -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,
)
......
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment