Skip to content
Snippets Groups Projects
Commit 46a11a07 authored by Simon McVittie's avatar Simon McVittie
Browse files

build: Generate a dependency for libs-r-t's generated headers


There's currently only one generated header, enums.h, but we could add
more in future.

We need to make sure the test_utils static library depends on that
generated header, otherwise it could be compiled before the header itself
is generated, leading to intermittent and unreproducible build failures
(for some reason scout i386 seems especially prone to this).

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 157de580
No related branches found
No related tags found
1 merge request!163build: Generate a dependency for libs-r-t's generated headers
Pipeline #5079 passed
......@@ -82,6 +82,10 @@ install_headers(
subdir : join_paths('steam-runtime-tools-' + api_major, 'steam-runtime-tools'),
)
libsteamrt_generated_headers_dep = declare_dependency(
include_directories : project_include_dirs,
sources : [enums[1]],
)
libsteamrt_static = static_library(
'steam-runtime-tools-internal',
libsteamrt_sources + libsteamrt_public_headers + enums,
......@@ -101,6 +105,7 @@ libsteamrt_static = static_library(
gobject,
libglnx_dep,
json_glib,
libsteamrt_generated_headers_dep,
],
install : false,
)
......@@ -115,6 +120,7 @@ libsteamrt = library(
gobject,
libglnx_dep,
json_glib,
libsteamrt_generated_headers_dep,
],
objects : [libsteamrt_static.extract_all_objects()],
soversion : abi_major,
......@@ -130,14 +136,14 @@ pkg.generate(
version : meson.project_version(),
)
libsteamrt_dep = declare_dependency(
dependencies : libsteamrt_generated_headers_dep,
include_directories : project_include_dirs,
link_with : libsteamrt,
sources : libsteamrt_public_headers + [enums[1]],
)
libsteamrt_static_dep = declare_dependency(
dependencies : libsteamrt_generated_headers_dep,
include_directories : project_include_dirs,
link_with : libsteamrt_static,
sources : libsteamrt_public_headers + [enums[1]],
)
if get_option('introspection')
......
......@@ -57,6 +57,7 @@ test_utils = static_library(
gio_unix,
json_glib,
libglnx_dep,
libsteamrt_generated_headers_dep,
],
include_directories : project_include_dirs,
install: false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment