4c49b27e9f
The custom target used to invoke Gradle from Meson should always be built, otherwise, the server would not be rebuilt on source changes. However, when enabling "build_always", gradle is invoked as root on "sudo ninja install" after "ninja", so it downloads the whole Gradle world into /root/.gradle. To avoid the problem, just do not call gradle if the effective user id is 0.
7 lines
376 B
Meson
7 lines
376 B
Meson
custom_target('scrcpy-server',
|
|
build_always: true, # gradle is responsible for tracking source changes
|
|
input: '.',
|
|
output: 'scrcpy-server.jar',
|
|
command: [find_program('./scripts/build-wrapper.sh'), '@INPUT@', '@OUTPUT@', get_option('buildtype')],
|
|
install: true,
|
|
install_dir: 'share/scrcpy')
|