2018-02-14 15:25:13 +00:00
|
|
|
# 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',
|
2020-04-13 20:43:28 +00:00
|
|
|
# gradle is responsible for tracking source changes
|
|
|
|
build_by_default: true,
|
|
|
|
build_always_stale: true,
|
2019-10-30 22:40:10 +00:00
|
|
|
output: 'scrcpy-server',
|
2019-05-25 02:56:17 +00:00
|
|
|
command: [find_program('./scripts/build-wrapper.sh'), meson.current_source_dir(), '@OUTPUT@', get_option('buildtype')],
|
2019-08-09 13:15:28 +00:00
|
|
|
console: true,
|
2018-02-14 15:25:13 +00:00
|
|
|
install: true,
|
|
|
|
install_dir: 'share/scrcpy')
|
|
|
|
else
|
2019-03-03 04:17:00 +00:00
|
|
|
if not prebuilt_server.startswith('/')
|
2022-08-16 22:15:25 +00:00
|
|
|
# prebuilt server path is relative to the root scrcpy directory
|
|
|
|
prebuilt_server = '../' + prebuilt_server
|
2019-03-03 04:17:00 +00:00
|
|
|
endif
|
2018-02-14 15:25:13 +00:00
|
|
|
custom_target('scrcpy-server-prebuilt',
|
|
|
|
input: prebuilt_server,
|
2019-10-30 22:40:10 +00:00
|
|
|
output: 'scrcpy-server',
|
2018-02-14 15:25:13 +00:00
|
|
|
command: ['cp', '@INPUT@', '@OUTPUT@'],
|
|
|
|
install: true,
|
|
|
|
install_dir: 'share/scrcpy')
|
|
|
|
endif
|