Files
screen_cast/meson.build
T
fegger b4d1411fd9 fix(build): make receiver-only builds link again after the GUI refactor
The sc_app_core static library was always compiled with SC_HAS_SENDER=1,
pulling CaptureFactory into receiver-only builds where the capture
backend does not exist. Three fixes:

- sc_app_core's cpp_args and capture dependency now follow the sender
  meson option, so pipelines.cpp and sender_session.cpp compile their
  sender code out on receiver-only targets.
- sender_session.cpp is fully guarded by SC_HAS_SENDER; its body is
  sender pipeline orchestration and has no business in a receiver.
- address_preference moved from a SenderSession static to a free inline
  function in sender_session.h — run_discover (available in every
  build) uses it for address sorting.

Also: the root meson.build now errors early if gui=true without
sender=true (the GUI is a sender panel).

Verified: meson test 5/5 in both configurations; the receiver-only
binary refuses --send with a clear message; the full build's sender,
GUI, and tests are unchanged.
2026-09-08 22:17:21 +02:00

32 lines
726 B
Meson

project('screen_cast', 'cpp',
version : '0.1.0',
default_options : [
'cpp_std=c++20',
'warning_level=3',
'werror=false',
'buildtype=release',
])
# Public and private include directories are declared in `src/meson.build`.
subdir('src')
# The GUI is a sender panel and needs the capture backend.
if get_option('gui') and not get_option('sender')
error('The GUI is a sender panel and requires -Dsender=true')
endif
# Manual smoke tools are sender-side.
if get_option('sender')
subdir('tools')
endif
# Tests
enable_tests = get_option('tests')
if enable_tests
subdir('tests')
endif
# Summary for the user
summary({
'tests': enable_tests,
}, section: 'Build options')