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

steam-runtime-tools: Separate out modules not in the shared library


We don't need to link SrtPortalListener or SrtPtyBridge into the
shared library, only into the executable utilities.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent a27dc2a3
No related branches found
No related tags found
1 merge request!660steam-runtime-tools: Separate out modules not in the shared library
Pipeline #76207 passed
...@@ -75,6 +75,7 @@ libsteamrt_public_headers = [ ...@@ -75,6 +75,7 @@ libsteamrt_public_headers = [
'xdg-portal.h', 'xdg-portal.h',
] ]
# Modules that are needed by parts of the public API
libsteamrt_internals = [ libsteamrt_internals = [
'architecture-internal.h', 'architecture-internal.h',
'cpu-feature-internal.h', 'cpu-feature-internal.h',
...@@ -104,12 +105,8 @@ libsteamrt_internals = [ ...@@ -104,12 +105,8 @@ libsteamrt_internals = [
'log-internal.h', 'log-internal.h',
'log.c', 'log.c',
'os-internal.h', 'os-internal.h',
'portal-listener.c',
'portal-listener-internal.h',
'profiling-internal.h', 'profiling-internal.h',
'profiling.c', 'profiling.c',
'pty-bridge-internal.h',
'pty-bridge.c',
'resolve-in-sysroot-internal.h', 'resolve-in-sysroot-internal.h',
'resolve-in-sysroot.c', 'resolve-in-sysroot.c',
'runtime-internal.h', 'runtime-internal.h',
...@@ -125,6 +122,15 @@ libsteamrt_internals = [ ...@@ -125,6 +122,15 @@ libsteamrt_internals = [
'virtualization-internal.h', 'virtualization-internal.h',
] ]
# Modules that are needed by bin/ or pressure-vessel/ but not by the
# library API
libsteamrt_static_extras = [
'portal-listener.c',
'portal-listener-internal.h',
'pty-bridge-internal.h',
'pty-bridge.c',
]
enums = gnome.mkenums_simple( enums = gnome.mkenums_simple(
'enums', 'enums',
decorator : '_SRT_PUBLIC', decorator : '_SRT_PUBLIC',
...@@ -196,10 +202,10 @@ systemd_codegen_dep = declare_dependency( ...@@ -196,10 +202,10 @@ systemd_codegen_dep = declare_dependency(
libsteamrt_generated_headers_dep = declare_dependency( libsteamrt_generated_headers_dep = declare_dependency(
include_directories : project_include_dirs, include_directories : project_include_dirs,
sources : [enums[1], launcher1[1], systemd_dbus[1]], sources : [enums[1]],
) )
libsteamrt_static = static_library( libsteamrt_base = static_library(
'steam-runtime-tools-internal', 'steam-runtime-tools-base',
libsteamrt_sources + libsteamrt_internals + libsteamrt_public_headers + enums, libsteamrt_sources + libsteamrt_internals + libsteamrt_public_headers + enums,
c_args : srt_c_args, c_args : srt_c_args,
include_directories : project_include_dirs, include_directories : project_include_dirs,
...@@ -229,11 +235,35 @@ libsteamrt = library( ...@@ -229,11 +235,35 @@ libsteamrt = library(
json_glib, json_glib,
libsteamrt_generated_headers_dep, libsteamrt_generated_headers_dep,
], ],
objects : [libsteamrt_static.extract_all_objects(recursive : true)], objects : [libsteamrt_base.extract_all_objects(recursive : true)],
soversion : abi_major, soversion : abi_major,
version : abi_major + '.' + abi_minor, version : abi_major + '.' + abi_minor,
install : true, install : true,
) )
libsteamrt_static_generated_headers_dep = declare_dependency(
include_directories : project_include_dirs,
sources : [launcher1[1], systemd_dbus[1]],
)
libsteamrt_static = static_library(
'steam-runtime-tools-internal',
libsteamrt_static_extras,
c_args : srt_c_args,
include_directories : project_include_dirs,
dependencies : [
libdl,
threads,
libelf,
gio_unix,
glib,
gobject,
libglnx_dep,
json_glib,
libsteamrt_generated_headers_dep,
libsteamrt_static_generated_headers_dep,
],
objects : [libsteamrt_base.extract_all_objects(recursive : true)],
install : false,
)
pkg.generate( pkg.generate(
description : 'Steam runtime tools library', description : 'Steam runtime tools library',
libraries : [libsteamrt], libraries : [libsteamrt],
...@@ -248,7 +278,10 @@ libsteamrt_dep = declare_dependency( ...@@ -248,7 +278,10 @@ libsteamrt_dep = declare_dependency(
link_with : libsteamrt, link_with : libsteamrt,
) )
libsteamrt_static_dep = declare_dependency( libsteamrt_static_dep = declare_dependency(
dependencies : libsteamrt_generated_headers_dep, dependencies : [
libsteamrt_generated_headers_dep,
libsteamrt_static_generated_headers_dep,
],
include_directories : project_include_dirs, include_directories : project_include_dirs,
link_with : libsteamrt_static, link_with : libsteamrt_static,
) )
......
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