Skip to content

Commit

Permalink
Replace hardcoded 'share/' by datadir variable
Browse files Browse the repository at this point in the history
Meson defines a variable for the data directory.

PR #3351 <#3351>
  • Loading branch information
rom1v committed Jun 27, 2022
1 parent 7f2f595 commit 434af65
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,17 @@ executable('scrcpy', src,
install: true,
c_args: [])

# <https://mesonbuild.com/Builtin-options.html#directories>
datadir = get_option('datadir') # by default 'share'

install_man('scrcpy.1')
install_data('data/icon.png',
rename: 'scrcpy.png',
install_dir: 'share/icons/hicolor/256x256/apps')
install_dir: join_paths(datadir, 'icons/hicolor/256x256/apps'))
install_data('data/zsh-completion/_scrcpy',
install_dir: 'share/zsh/site-functions')
install_dir: join_paths(datadir, 'zsh/site-functions'))
install_data('data/bash-completion/scrcpy',
install_dir: 'share/bash-completion/completions')
install_dir: join_paths(datadir, 'bash-completion/completions'))


### TESTS
Expand Down

0 comments on commit 434af65

Please sign in to comment.