Messing around with --datadir, cleaning meson.build a bit
To run the binary while debugging you should now configure with -Dscript_path=$HOME/your/source/dir
This commit is contained in:
parent
1090ea8295
commit
8ce0e362bb
1 changed files with 6 additions and 5 deletions
11
meson.build
11
meson.build
|
@ -7,17 +7,18 @@ project('duckticker', 'cpp',
|
|||
|
||||
compiler_opts = ['-DWRENPP_WITH_NAME_GUESSING']
|
||||
|
||||
full_data_dir = get_option('prefix') / get_option('datadir')
|
||||
|
||||
global_config = configuration_data()
|
||||
global_config.set_quoted('PROJECT_NAME', meson.project_name())
|
||||
version_arr = meson.project_version().split('.')
|
||||
global_config.set('PROJECT_VERSION_MAJOR', version_arr[0])
|
||||
global_config.set('PROJECT_VERSION_MINOR', version_arr[1])
|
||||
global_config.set('PROJECT_VERSION_PATCH', version_arr[2])
|
||||
global_config.set_quoted('SCRIPT_PATH', get_option('prefix') / get_option('script_path') / '')
|
||||
global_config.set_quoted('SCRIPT_PATH', full_data_dir / get_option('script_path') / '')
|
||||
|
||||
subdir('src')
|
||||
|
||||
#full_config_dir = get_option('prefix') / get_option('sysconfdir')
|
||||
#if meson.source_root() != full_config_dir
|
||||
# install_data(sources: meson.project_name() + '.conf', install_dir: full_config_dir)
|
||||
#endif
|
||||
if meson.project_source_root() != full_data_dir
|
||||
install_data(sources: 'script/main.wren', install_dir: full_data_dir)
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue