diff options
Diffstat (limited to 'src/libtracker-sparql/meson.build')
-rw-r--r-- | src/libtracker-sparql/meson.build | 68 |
1 files changed, 15 insertions, 53 deletions
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build index 51d89d196..3fb684f2f 100644 --- a/src/libtracker-sparql/meson.build +++ b/src/libtracker-sparql/meson.build @@ -1,87 +1,51 @@ -enums_c = gnome.mkenums('tracker-sparql-enum-types', - sources: 'tracker-notifier.h', +enum_types = gnome.mkenums('tracker-sparql-enum-types', + sources: ['tracker-notifier.h', 'tracker-connection.h'], c_template: 'tracker-sparql-enum-types.c.template', -) -enums_h = gnome.mkenums('tracker-sparql-enum-types', - sources: 'tracker-notifier.h', h_template: 'tracker-sparql-enum-types.h.template', + install_dir: join_paths(get_option('prefix'), get_option('includedir'), 'tracker-@0@'.format(tracker_api_version), 'libtracker-sparql'), + install_header: true, ) -# 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', - 'tracker-connection.vala', - 'tracker-cursor.vala', - 'tracker-statement.vala', - 'tracker-utils.vala', - vala_header: 'tracker-generated-no-checks.h', - c_args: tracker_c_args, - vala_gir: 'Tracker_Vala-' + tracker_api_version + '.gir', - vala_args: [ - '--debug', - '--includedir', 'libtracker-sparql', - '--pkg', 'gio-2.0', '--pkg', 'posix', - # FIXME: Meson has code to add --target-glib automatically, but it - # doesn't seem to work here. - '--target-glib', glib_required, - libtracker_sparql_c_vapi - ], - dependencies: [tracker_common_dep], - include_directories: [commoninc, configinc, srcinc], -) - -# We must postprocess the generated Vala header to have only-include-once guards -tracker_sparql_generated_header = custom_target('tracker-sparql-generated-header', - # FIXME: can't list tracker-generated-no-checks as an input, even though it - # is, because you'll see this: - # - # ninja: error: - # '../src/libtracker-sparql/tracker-generated-no-checks.h', needed by - # 'src/libtracker-sparql/tracker-generated.h', missing and no known - # rule to make it - # - output: 'tracker-generated.h', - command: [join_paths(meson.current_source_dir(), 'tracker-sparql-add-include-guards.sh'), join_paths(meson.current_build_dir(), 'tracker-generated-no-checks.h'), '@OUTPUT@'], - depends: libtracker_sparql_intermediate_vala, - install: true, - install_dir: join_paths(get_option('prefix'), get_option('includedir'), 'tracker-@0@'.format(tracker_api_version), 'libtracker-sparql')) - -# Now build the C parts ... - libtracker_sparql_c_sources = files( + 'tracker-connection.c', + 'tracker-cursor.c', 'tracker-endpoint.c', 'tracker-endpoint-dbus.c', 'tracker-namespace-manager.c', 'tracker-notifier.c', 'tracker-resource.c', + 'tracker-statement.c', 'tracker-uri.c', + 'tracker-utils.c', 'tracker-version.c', ) libtracker_sparql_c_public_headers = files( + 'tracker-connection.h', + 'tracker-cursor.h', 'tracker-endpoint.h', 'tracker-endpoint-dbus.h', 'tracker-namespace-manager.h', 'tracker-notifier.h', 'tracker-resource.h', + 'tracker-statement.h', + 'tracker-utils.h', 'tracker-version.h', ) -libtracker_sparql_intermediate_c = static_library('tracker-sparql-intermediate-c', - enums_c, enums_h, tracker_sparql_generated_header[0], +libtracker_sparql_intermediate = static_library('tracker-sparql-intermediate', + enum_types, libtracker_sparql_c_sources, dependencies: [tracker_common_dep, json_glib], - link_with: libtracker_sparql_intermediate_vala, ) sparqlinc = [include_directories('.'), meson.current_build_dir()] tracker_sparql_intermediate_dep = declare_dependency( - link_with: [libtracker_sparql_intermediate_c, libtracker_sparql_intermediate_vala], - sources: tracker_sparql_generated_header, + link_with: [libtracker_sparql_intermediate], include_directories: [srcinc, include_directories('.')], dependencies: [ libtracker_sparql_c_vapi_dep ], ) @@ -99,9 +63,7 @@ tracker_sparql_vapi = custom_target('tracker-sparql-' + tracker_api_version + '. command: [ 'sed', '-e', 's#libtracker-sparql/.*[.]h#libtracker-sparql/tracker-sparql.h#', libtracker_sparql_c_vapi, - join_paths(meson.current_build_dir(), 'tracker-sparql-intermediate-vala.vapi') ], - depends: libtracker_sparql_intermediate_vala, capture: true, install: true, install_dir: vapi_dir) |