Commit 053868e1 authored by Michael Gratton's avatar Michael Gratton 🤞

Merge branch 'wip/engine-header-missing-build-failure' into 'master'

Fix occasional "geary-engine.h: No such file or directory" build errors

See merge request !68
parents 1d15de11 1dd36d84
Pipeline #44903 passed with stage
in 42 minutes and 52 seconds
......@@ -337,69 +337,62 @@ geary_engine_dependencies = [
build_dir = meson.current_build_dir()
# Generate internal VAPI for unit testing. See Meson issue
# for official
# internal VAPI support.
geary_engine_vala_options = geary_vala_options
geary_engine_vala_options += [
# Nasty hack to make sure engine internal VAPI is generated. See
# Meson issue for
# official internal VAPI support. See Vala Bug 731322 about the
# specifics of the arguments used below to generate the internal
# VAPI. In particular, the header filenames must not contain any
# paths or else the internal vapi will use the public header, not
# the internal header. Of course these paths breaks the build, so we
# fix it up using cp below. The internal VAPI is correctly put in
# Meson's base working directory,
geary_engine_lib = static_library('geary-engine',
dependencies: geary_engine_dependencies,
link_with: sqlite3_unicodesn_lib,
include_directories: config_h_dir,
vala_args: geary_engine_vala_options,
c_args: geary_c_options,
geary_engine_dep = declare_dependency(
link_with: [
include_directories: include_directories('.'),
# Dummy target to fix the location of the public and internal headers,
# and tell Meson about the internal VAPI
geary_engine_internal_vapi = custom_target(
input: geary_engine_sources,
# Dummy target to tell Meson about the internal VAPI given the
# workaround above, and fix the VAPI header to work around
# GNOME/vala#358
geary_engine_internal_header_fixup = custom_target(
source: geary_engine_sources,
output: [
command: [
depends: geary_engine_lib
geary_engine_dep = declare_dependency(
link_with: [
include_directories: include_directories('.')
geary_engine_internal_dep = declare_dependency(
# Can't just include geary_engine_lib in link_with since that will
# pull in the public header and we get duplicate symbol errors.
link_args: [
'-L' + meson.build_root() + '/src/engine',
'-L' + build_dir,
link_with: [
include_directories: include_directories('.'),
sources: [
sources: geary_engine_internal_header_fixup
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