mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-14 19:25:25 +00:00
20b3f101a4
Enable the attribute "console" of custom_target() introduced in meson 0.48. This allows to get a feedback of what gradle does (which can takes a very long time). This produces warnings because we declare to support meson >= 0.37, but we don't want to stop supporting older versions for that. Older versions just ignore the option: > WARNING: Unknown keyword arguments in target scrcpy-server: console Newer meson versions use it, but warn because we declare supporting older versions: > WARNING: Project targetting '>= 0.37' but tried to use feature > introduced in '0.48.0': console arg in custom_target Meson does not support conditional branches to suppress such warnings, so just keep the warnings.
24 lines
1.1 KiB
Meson
24 lines
1.1 KiB
Meson
# It may be useful to use a prebuilt server, so that no Android SDK is required
|
|
# to build. If the 'prebuilt_server' option is set, just copy the file as is.
|
|
prebuilt_server = get_option('prebuilt_server')
|
|
if prebuilt_server == ''
|
|
custom_target('scrcpy-server',
|
|
build_always: true, # gradle is responsible for tracking source changes
|
|
output: 'scrcpy-server.jar',
|
|
command: [find_program('./scripts/build-wrapper.sh'), meson.current_source_dir(), '@OUTPUT@', get_option('buildtype')],
|
|
console: true,
|
|
install: true,
|
|
install_dir: 'share/scrcpy')
|
|
else
|
|
if not prebuilt_server.startswith('/')
|
|
# relative path needs some trick
|
|
prebuilt_server = meson.source_root() + '/' + prebuilt_server
|
|
endif
|
|
custom_target('scrcpy-server-prebuilt',
|
|
input: prebuilt_server,
|
|
output: 'scrcpy-server.jar',
|
|
command: ['cp', '@INPUT@', '@OUTPUT@'],
|
|
install: true,
|
|
install_dir: 'share/scrcpy')
|
|
endif
|