GTK+: Add appdatadir to meson build for Snes9x-only files.

This commit is contained in:
Brandon Wright 2018-12-18 15:49:53 -06:00
parent 0b787becc1
commit a28a6399cb
3 changed files with 11 additions and 7 deletions

View File

@ -1,5 +1,4 @@
datadir = join_paths(get_option('prefix'), get_option('datadir')) install_data('../../data/cheats.bml', install_dir: appdatadir)
install_data('../../data/cheats.bml')
install_data('snes9x.desktop', install_dir: join_paths(datadir, 'applications')) install_data('snes9x.desktop', install_dir: join_paths(datadir, 'applications'))
hicolor = join_paths(datadir, 'icons', 'hicolor') hicolor = join_paths(datadir, 'icons', 'hicolor')

View File

@ -5,9 +5,6 @@ project('snes9x-gtk',
'buildtype=release', 'buildtype=release',
'strip=true']) 'strip=true'])
subdir('po')
subdir('data')
args = [ '-DSNES9X_GTK', '-DUNZIP_SUPPORT', '-DNETPLAY_SUPPORT', '-DJMA_SUPPORT', '-Wall', '-W', '-Wno-unused-parameter' ] args = [ '-DSNES9X_GTK', '-DUNZIP_SUPPORT', '-DNETPLAY_SUPPORT', '-DJMA_SUPPORT', '-Wall', '-W', '-Wno-unused-parameter' ]
srcs = [] srcs = []
deps = [] deps = []
@ -15,8 +12,15 @@ includes = [ '../apu/bapu', '../', 'src' ]
prefix = get_option('prefix') prefix = get_option('prefix')
localedir = join_paths(prefix, get_option('localedir')) localedir = join_paths(prefix, get_option('localedir'))
datadir = join_paths(prefix, get_option('datadir'), 'snes9x') datadir = get_option('datadir')
args += [ '-DDATADIR="' + datadir + '"', '-DSNES9XLOCALEDIR="' + localedir + '"' ] appdatadir = get_option ('appdatadir')
if appdatadir == ''
appdatadir = join_paths(prefix, datadir, 'snes9x')
endif
args += [ '-DDATADIR="' + appdatadir + '"', '-DSNES9XLOCALEDIR="' + localedir + '"' ]
subdir('data')
subdir('po')
glib_dep = dependency('glib-2.0', version: '> 2.28') glib_dep = dependency('glib-2.0', version: '> 2.28')
gthread_dep = dependency('gthread-2.0', version: '>= 2.6') gthread_dep = dependency('gthread-2.0', version: '>= 2.6')

View File

@ -14,3 +14,4 @@ option('gtk3', type: 'boolean', value: true, description: 'Build wit
option('wayland', type: 'boolean', value: true, description: 'Build support for Wayland') option('wayland', type: 'boolean', value: true, description: 'Build support for Wayland')
option('gtk2', type: 'boolean', value: false, description: 'Build with GTK+ 2.0 as the toolkit') option('gtk2', type: 'boolean', value: false, description: 'Build with GTK+ 2.0 as the toolkit')
option('dangerous-hacks', type: 'boolean', value: false, description: 'Allow dangerous hacks to be enabled') option('dangerous-hacks', type: 'boolean', value: false, description: 'Allow dangerous hacks to be enabled')
option('appdatadir', type: 'string' , value: '', description: 'Snes9x-only data directory')