build: Prefer dependencies instead of link_with
Meson uses the 'dependencies' field to determine and parallelize build steps, but that isn't entirely true with 'link_with'; this might cause a race condition when generating header files while trying to build them. Fix that by only using 'dependencies' instead of 'link_with'.
This commit is contained in:
parent
d3dc7d6f49
commit
d1c4c46281
@ -13,8 +13,10 @@ libmutter_cogl_gles2 = shared_library('mutter-cogl-gles2-' + libmutter_api_versi
|
|||||||
c_args: cogl_c_args,
|
c_args: cogl_c_args,
|
||||||
include_directories: [cogl_includepath, cogl_path_includepath],
|
include_directories: [cogl_includepath, cogl_path_includepath],
|
||||||
link_depends: 'libmutter-cogl-gles2.map',
|
link_depends: 'libmutter-cogl-gles2.map',
|
||||||
dependencies: [cogl_deps],
|
dependencies: [
|
||||||
link_with: libmutter_cogl,
|
cogl_deps,
|
||||||
|
libmutter_cogl_dep
|
||||||
|
],
|
||||||
install_rpath: pkglibdir,
|
install_rpath: pkglibdir,
|
||||||
install_dir: pkglibdir,
|
install_dir: pkglibdir,
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -18,6 +18,7 @@ cogl_pango_deps = [
|
|||||||
cogl_deps,
|
cogl_deps,
|
||||||
pango_dep,
|
pango_dep,
|
||||||
pangocairo_dep,
|
pangocairo_dep,
|
||||||
|
libmutter_cogl_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
libmutter_cogl_pango = shared_library('mutter-cogl-pango-' + libmutter_api_version,
|
libmutter_cogl_pango = shared_library('mutter-cogl-pango-' + libmutter_api_version,
|
||||||
@ -25,13 +26,16 @@ libmutter_cogl_pango = shared_library('mutter-cogl-pango-' + libmutter_api_versi
|
|||||||
c_args: cogl_c_args,
|
c_args: cogl_c_args,
|
||||||
include_directories: [cogl_includepath, cogl_path_includepath],
|
include_directories: [cogl_includepath, cogl_path_includepath],
|
||||||
link_depends: 'libmutter-cogl-pango.map',
|
link_depends: 'libmutter-cogl-pango.map',
|
||||||
dependencies: cogl_pango_deps,
|
dependencies: [cogl_pango_deps],
|
||||||
link_with: libmutter_cogl,
|
|
||||||
install_rpath: pkglibdir,
|
install_rpath: pkglibdir,
|
||||||
install_dir: pkglibdir,
|
install_dir: pkglibdir,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
libmutter_cogl_pango_dep = declare_dependency(
|
||||||
|
link_with: libmutter_cogl_pango,
|
||||||
|
)
|
||||||
|
|
||||||
if have_introspection
|
if have_introspection
|
||||||
libmutter_cogl_pango_gir = gnome.generate_gir(libmutter_cogl_pango,
|
libmutter_cogl_pango_gir = gnome.generate_gir(libmutter_cogl_pango,
|
||||||
sources: cogl_pango_public_headers,
|
sources: cogl_pango_public_headers,
|
||||||
@ -44,8 +48,11 @@ if have_introspection
|
|||||||
'Pango-1.0',
|
'Pango-1.0',
|
||||||
'PangoCairo-1.0'
|
'PangoCairo-1.0'
|
||||||
],
|
],
|
||||||
dependencies: [cogl_deps, pango_dep],
|
dependencies: [
|
||||||
link_with: [libmutter_cogl, libmutter_cogl_pango],
|
cogl_deps,
|
||||||
|
pango_dep,
|
||||||
|
libmutter_cogl_pango_dep,
|
||||||
|
],
|
||||||
extra_args: [
|
extra_args: [
|
||||||
'-UCOGL_COMPILATION',
|
'-UCOGL_COMPILATION',
|
||||||
'-DG_LOG_DOMAIN=\"CoglPango\"',
|
'-DG_LOG_DOMAIN=\"CoglPango\"',
|
||||||
|
@ -54,8 +54,7 @@ libmutter_cogl_path = shared_library('mutter-cogl-path-' + libmutter_api_version
|
|||||||
c_args: cogl_c_args,
|
c_args: cogl_c_args,
|
||||||
include_directories: [cogl_includepath, cogl_path_includepath],
|
include_directories: [cogl_includepath, cogl_path_includepath],
|
||||||
link_depends: 'libmutter-cogl-path.map',
|
link_depends: 'libmutter-cogl-path.map',
|
||||||
dependencies: [cogl_deps],
|
dependencies: [libmutter_cogl_dep, cogl_deps],
|
||||||
link_with: libmutter_cogl,
|
|
||||||
install_rpath: pkglibdir,
|
install_rpath: pkglibdir,
|
||||||
install_dir: pkglibdir,
|
install_dir: pkglibdir,
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -80,10 +80,10 @@ libmutter_cogl_test_conformance = executable('test-conformance',
|
|||||||
include_directories: cogl_test_conformance_includes,
|
include_directories: cogl_test_conformance_includes,
|
||||||
dependencies: [
|
dependencies: [
|
||||||
cogl_deps,
|
cogl_deps,
|
||||||
|
libmutter_cogl_dep,
|
||||||
libmutter_cogl_path_dep,
|
libmutter_cogl_path_dep,
|
||||||
libmutter_cogl_test_fixtures_dep
|
libmutter_cogl_test_fixtures_dep,
|
||||||
],
|
],
|
||||||
link_with: [libmutter_cogl],
|
|
||||||
install: false,
|
install: false,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +9,9 @@ cogl_test_journal = executable('test-journal',
|
|||||||
'-DTESTS_DATADIR="@0@"'.format(join_paths(cogl_srcdir, 'tests/data')),
|
'-DTESTS_DATADIR="@0@"'.format(join_paths(cogl_srcdir, 'tests/data')),
|
||||||
],
|
],
|
||||||
include_directories: cogl_includepath,
|
include_directories: cogl_includepath,
|
||||||
dependencies: cogl_deps,
|
dependencies: [
|
||||||
link_with: [libmutter_cogl],
|
cogl_deps,
|
||||||
|
libmutter_cogl_dep,
|
||||||
|
],
|
||||||
install: false,
|
install: false,
|
||||||
)
|
)
|
||||||
|
@ -15,8 +15,12 @@ libmutter_cogl_test_unit = executable('test-unit',
|
|||||||
'-DTESTS_DATADIR="@0@/tests/data"'.format(cogl_srcdir),
|
'-DTESTS_DATADIR="@0@/tests/data"'.format(cogl_srcdir),
|
||||||
],
|
],
|
||||||
include_directories: cogl_test_unit_includes,
|
include_directories: cogl_test_unit_includes,
|
||||||
dependencies: [cogl_deps, libmutter_cogl_test_fixtures_dep],
|
dependencies: [
|
||||||
link_with: [libmutter_cogl, libmutter_cogl_path],
|
cogl_deps,
|
||||||
|
libmutter_cogl_dep,
|
||||||
|
libmutter_cogl_path_dep,
|
||||||
|
libmutter_cogl_test_fixtures_dep,
|
||||||
|
],
|
||||||
install: false,
|
install: false,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -782,8 +782,10 @@ if have_introspection
|
|||||||
libmutter_cogl_pango_gir[0],
|
libmutter_cogl_pango_gir[0],
|
||||||
libmutter_clutter_gir[0],
|
libmutter_clutter_gir[0],
|
||||||
],
|
],
|
||||||
dependencies: [mutter_deps],
|
dependencies: [
|
||||||
link_with: [libmutter],
|
mutter_deps,
|
||||||
|
libmutter_dep,
|
||||||
|
],
|
||||||
extra_args: mutter_c_args + [
|
extra_args: mutter_c_args + [
|
||||||
'-U_GNU_SOURCE',
|
'-U_GNU_SOURCE',
|
||||||
],
|
],
|
||||||
|
@ -5,6 +5,7 @@ tests_c_args = mutter_c_args
|
|||||||
|
|
||||||
tests_deps = [
|
tests_deps = [
|
||||||
mutter_deps,
|
mutter_deps,
|
||||||
|
libmutter_dep,
|
||||||
libmutter_cogl_dep,
|
libmutter_cogl_dep,
|
||||||
libmutter_clutter_dep,
|
libmutter_clutter_dep,
|
||||||
]
|
]
|
||||||
@ -34,7 +35,6 @@ test_runner = executable('mutter-test-runner',
|
|||||||
],
|
],
|
||||||
include_directories: tests_includepath,
|
include_directories: tests_includepath,
|
||||||
c_args: tests_c_args,
|
c_args: tests_c_args,
|
||||||
link_with: [libmutter],
|
|
||||||
dependencies: [tests_deps],
|
dependencies: [tests_deps],
|
||||||
install: false,
|
install: false,
|
||||||
)
|
)
|
||||||
@ -61,7 +61,6 @@ unit_tests = executable('mutter-test-unit-tests',
|
|||||||
],
|
],
|
||||||
include_directories: tests_includepath,
|
include_directories: tests_includepath,
|
||||||
c_args: tests_c_args,
|
c_args: tests_c_args,
|
||||||
link_with: [libmutter],
|
|
||||||
dependencies: [tests_deps],
|
dependencies: [tests_deps],
|
||||||
install: false,
|
install: false,
|
||||||
)
|
)
|
||||||
@ -78,7 +77,6 @@ headless_start_test = executable('mutter-headless-start-test',
|
|||||||
],
|
],
|
||||||
include_directories: tests_includepath,
|
include_directories: tests_includepath,
|
||||||
c_args: tests_c_args,
|
c_args: tests_c_args,
|
||||||
link_with: [libmutter],
|
|
||||||
dependencies: [tests_deps],
|
dependencies: [tests_deps],
|
||||||
install: false,
|
install: false,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user