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