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

build: Consistently sort dependencies in stack order


It's slightly preferable to list linker and compiler flags in stack
order, with the lowest in the stack first. This allows use of a
higher-level library from a non-standard prefix without also necessarily
picking up lower-level libraries from the same non-standard-prefix.
For example, if /path/to/json-glib also includes a copy of GLib, then

    -L/path/to/glib -lglib-2.0 -L/path/to/json-glib -ljson-glib-1.0

will link the GLib from /path/to/glib, but

    -L/path/to/json-glib -ljson-glib-1.0 -L/path/to/glib -lglib-2.0

will link both the GLib and the json-glib from /path/to/json-glib.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent fb9622d0
No related branches found
No related tags found
1 merge request!84Enumerate Mesa DRI modules and VA-API drivers
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
executable( executable(
'steam-runtime-system-info', 'steam-runtime-system-info',
'system-info.c', 'system-info.c',
dependencies : [glib, libsteamrt_dep, json_glib], dependencies : [glib, json_glib, libsteamrt_dep],
install : true, install : true,
# Use the adjacent libsteam-runtime-tools and json-glib, ignoring # Use the adjacent libsteam-runtime-tools and json-glib, ignoring
# LD_LIBRARY_PATH even if set # LD_LIBRARY_PATH even if set
......
...@@ -35,7 +35,7 @@ executable( ...@@ -35,7 +35,7 @@ executable(
multiarch + '-check-locale', multiarch + '-check-locale',
'check-locale.c', 'check-locale.c',
include_directories : project_include_dirs, include_directories : project_include_dirs,
dependencies : [json_glib, glib], dependencies : [glib, json_glib],
install : true, install : true,
install_dir : pkglibexecdir, install_dir : pkglibexecdir,
# Use json-glib and GLib from the adjacent libdir, ignoring LD_LIBRARY_PATH # Use json-glib and GLib from the adjacent libdir, ignoring LD_LIBRARY_PATH
......
...@@ -76,7 +76,7 @@ libsteamrt = library( ...@@ -76,7 +76,7 @@ libsteamrt = library(
'-D_SRT_API_MAJOR="' + api_major + '"', '-D_SRT_API_MAJOR="' + api_major + '"',
], ],
include_directories : project_include_dirs, include_directories : project_include_dirs,
dependencies : [glib, gobject, libdl, json_glib, threads, libelf], dependencies : [libdl, threads, libelf, glib, gobject, json_glib],
soversion : abi_major, soversion : abi_major,
version : abi_major + '.' + abi_minor, version : abi_major + '.' + abi_minor,
install : true, install : true,
......
...@@ -86,7 +86,7 @@ foreach test_name : tests ...@@ -86,7 +86,7 @@ foreach test_name : tests
c_args : [ c_args : [
'-D_SRT_MULTIARCH="' + multiarch + '"', '-D_SRT_MULTIARCH="' + multiarch + '"',
], ],
dependencies : [glib, gobject, libsteamrt_dep, json_glib], dependencies : [glib, gobject, json_glib, libsteamrt_dep],
include_directories : project_include_dirs, include_directories : project_include_dirs,
install : get_option('installed_tests'), install : get_option('installed_tests'),
install_dir : tests_dir, install_dir : tests_dir,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment