Set icon and server env paths for meson devenv

This allows users to compile and run the project in a dev environment.

    meson setup x
    meson compile -C x
    meson devenv -C x
    scrcpy

This is an alternative to `./run x`.

PR #5658 <https://github.com/Genymobile/scrcpy/pull/5658>

Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
Colin Kinloch 2024-12-12 12:41:22 +00:00 committed by Romain Vimont
parent 17e205e54f
commit ec4e826976
2 changed files with 12 additions and 0 deletions

View File

@ -279,3 +279,9 @@ if get_option('buildtype') == 'debug'
test(t[0], exe)
endforeach
endif
if meson.version().version_compare('>= 0.58.0')
devenv = environment()
devenv.set('SCRCPY_ICON_PATH', meson.current_source_dir() / 'data/icon.png')
meson.add_devenv(devenv)
endif

View File

@ -23,3 +23,9 @@ else
install: true,
install_dir: 'share/scrcpy')
endif
if meson.version().version_compare('>= 0.58.0')
devenv = environment()
devenv.set('SCRCPY_SERVER_PATH', meson.current_build_dir() / 'scrcpy-server')
meson.add_devenv(devenv)
endif