Commit 00c4b8e4 authored by Zeeshan Ali's avatar Zeeshan Ali

build: Declare build-time deps on generated headers

This should fix the issue with parallel build on mega-multi-core machiens
we are seeing.
parent 7d3fa845
......@@ -15,8 +15,7 @@ if get_option('libgeoclue')
'where-am-i.c',
include_directories: include_dirs,
c_args: c_args,
link_with: [ libgeoclue ],
dependencies: base_deps,
dependencies: [base_deps, libgeoclue_dep],
install: true,
install_dir: demo_dir)
desktop_in = configure_file(output: 'geoclue-where-am-i.desktop.in',
......@@ -38,7 +37,8 @@ if get_option('demo-agent')
c_args = [ '-Werror' ]
sources = [ 'gclue-service-agent.h',
'gclue-service-agent.c',
'agent.c' ]
'agent.c',
libgeoclue_agent_sources[1] ]
deps = base_deps + [ dependency('libnotify') ]
executable('agent',
sources,
......
......@@ -53,6 +53,10 @@ libgeoclue = library('geoclue-2',
version: '0.0.0',
install: true)
libgeoclue_dep = declare_dependency(
link_with: libgeoclue,
sources: libgeoclue_public_api_gen_sources[1])
gir = find_program('g-ir-scanner', required: false)
vapigen = find_program('vapigen', required: false)
cross_build = meson.is_cross_build()
......@@ -60,7 +64,7 @@ enable_gir = get_option('introspection')
pkg_requirements = ['glib-2.0', 'gio-2.0', 'gio-unix-2.0']
gir_sources = [ libgeoclue_sources,
libgeoclue_headers,
'../public-api/gclue-enums.h' ]
libgeoclue_public_api_gen_sources[1] ]
if gir.found() and not cross_build and enable_gir
geo_gir = gnome.generate_gir(libgeoclue,
......
......@@ -3,15 +3,16 @@ headers = [ 'gclue-enums.h' ]
header_dir = 'libgeoclue-' + gclue_api_version
install_headers(headers, subdir: header_dir)
gen_sources = gnome.mkenums_simple('gclue-enum-types',
sources: headers,
header_prefix: '#include <gclue-enums.h>',
decorator : 'GCLUE_ENUMS_H',
install_header: true,
install_dir: 'include/' + header_dir)
libgeoclue_public_api_gen_sources = gnome.mkenums_simple(
'gclue-enum-types',
sources: headers,
header_prefix: '#include <gclue-enums.h>',
decorator : 'GCLUE_ENUMS_H',
install_header: true,
install_dir: 'include/' + header_dir)
libgeoclue_public_api_inc = include_directories('.')
libgeoclue_public_api = static_library('geoclue-public-api',
gen_sources,
libgeoclue_public_api_gen_sources,
dependencies: base_deps,
install: false)
sources = gnome.gdbus_codegen('geoclue-agent-interface',
'org.freedesktop.GeoClue2.Agent.xml',
interface_prefix: 'org.freedesktop.GeoClue2.',
namespace: 'GClue',
docbook: 'docs')
libgeoclue_agent_sources = gnome.gdbus_codegen(
'geoclue-agent-interface',
'org.freedesktop.GeoClue2.Agent.xml',
interface_prefix: 'org.freedesktop.GeoClue2.',
namespace: 'GClue',
docbook: 'docs')
libgeoclue_agent_inc = include_directories('.', '../..')
libgeoclue_agent = static_library('geoclue-agent',
sources,
libgeoclue_agent_sources,
dependencies: base_deps,
include_directories: libgeoclue_agent_inc,
install: false)
......
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