convert unix style paths literals into meson path segments
This commit is contained in:
parent
dcedce8e6a
commit
c15910856a
37
meson.build
37
meson.build
|
@ -184,54 +184,55 @@ if get_option('portable') or host_machine.system() == 'windows'
|
||||||
lite_docdir = '/doc'
|
lite_docdir = '/doc'
|
||||||
lite_datadir = '/data'
|
lite_datadir = '/data'
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'resources/windows/lite-xl.exe.manifest.in',
|
input: 'resources' / 'windows' / 'lite-xl.exe.manifest.in',
|
||||||
output: 'lite-xl.exe.manifest',
|
output: 'lite-xl.exe.manifest',
|
||||||
configuration: conf_data
|
configuration: conf_data
|
||||||
)
|
)
|
||||||
elif get_option('bundle') and host_machine.system() == 'darwin'
|
elif get_option('bundle') and host_machine.system() == 'darwin'
|
||||||
lite_cargs += '-DMACOS_USE_BUNDLE'
|
lite_cargs += '-DMACOS_USE_BUNDLE'
|
||||||
lite_bindir = 'Contents/MacOS'
|
lite_bindir = 'Contents' / 'MacOS'
|
||||||
lite_docdir = 'Contents/Resources'
|
lite_docdir = 'Contents' / 'Resources'
|
||||||
lite_datadir = 'Contents/Resources'
|
lite_datadir = 'Contents' / 'Resources'
|
||||||
conf_data.set(
|
conf_data.set(
|
||||||
'CURRENT_YEAR',
|
'CURRENT_YEAR',
|
||||||
run_command('date', '+%Y', capture: true).stdout().strip()
|
run_command('date', '+%Y', capture: true).stdout().strip()
|
||||||
)
|
)
|
||||||
install_data('resources/icons/icon.icns', install_dir : 'Contents/Resources')
|
install_data('resources' / 'icons' / 'icon.icns', install_dir : 'Contents' / 'Resources')
|
||||||
configure_file(
|
configure_file(
|
||||||
input : 'resources/macos/Info.plist.in',
|
input : 'resources' / 'macos' / 'Info.plist.in',
|
||||||
output : 'Info.plist',
|
output : 'Info.plist',
|
||||||
configuration : conf_data,
|
configuration : conf_data,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : 'Contents'
|
install_dir : 'Contents'
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
message()
|
||||||
lite_bindir = 'bin'
|
lite_bindir = 'bin'
|
||||||
lite_docdir = get_option('datadir') + '/doc/lite-xl'
|
lite_docdir = get_option('datadir') / 'doc' / 'lite-xl'
|
||||||
lite_datadir = get_option('datadir') + '/lite-xl'
|
lite_datadir = get_option('datadir') / 'lite-xl'
|
||||||
if host_machine.system() == 'linux'
|
if host_machine.system() == 'linux'
|
||||||
install_data('resources/icons/lite-xl.svg',
|
install_data('resources' / 'icons' / 'lite-xl.svg',
|
||||||
install_dir : get_option('datadir') + '/icons/hicolor/scalable/apps'
|
install_dir : get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps'
|
||||||
)
|
)
|
||||||
install_data('resources/linux/com.lite_xl.LiteXL.desktop',
|
install_data('resources' / 'linux' / 'com.lite_xl.LiteXL.desktop',
|
||||||
install_dir : get_option('datadir') + '/applications'
|
install_dir : get_option('datadir') / 'applications'
|
||||||
)
|
)
|
||||||
install_data('resources/linux/com.lite_xl.LiteXL.appdata.xml',
|
install_data('resources' / 'linux' / 'com.lite_xl.LiteXL.appdata.xml',
|
||||||
install_dir : get_option('datadir') + '/metainfo'
|
install_dir : get_option('datadir') / 'metainfo'
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install_data('licenses/licenses.md', install_dir : lite_docdir)
|
install_data('licenses' / 'licenses.md', install_dir : lite_docdir)
|
||||||
|
|
||||||
install_subdir('docs/api' , install_dir : lite_datadir, strip_directory: true)
|
install_subdir('docs' / 'api' , install_dir : lite_datadir, strip_directory: true)
|
||||||
install_subdir('data/core' , install_dir : lite_datadir, exclude_files : 'start.lua')
|
install_subdir('data' / 'core' , install_dir : lite_datadir, exclude_files : 'start.lua')
|
||||||
foreach data_module : ['fonts', 'plugins', 'colors']
|
foreach data_module : ['fonts', 'plugins', 'colors']
|
||||||
install_subdir(join_paths('data', data_module), install_dir : lite_datadir)
|
install_subdir(join_paths('data', data_module), install_dir : lite_datadir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input : 'data/core/start.lua',
|
input : 'data' / 'core' / 'start.lua',
|
||||||
output : 'start.lua',
|
output : 'start.lua',
|
||||||
configuration : conf_data,
|
configuration : conf_data,
|
||||||
install_dir : join_paths(lite_datadir, 'core'),
|
install_dir : join_paths(lite_datadir, 'core'),
|
||||||
|
|
|
@ -37,22 +37,22 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if dirmonitor_backend == 'inotify'
|
if dirmonitor_backend == 'inotify'
|
||||||
lite_sources += 'api/dirmonitor/inotify.c'
|
lite_sources += 'api' / 'dirmonitor' / 'inotify.c'
|
||||||
elif dirmonitor_backend == 'fsevents'
|
elif dirmonitor_backend == 'fsevents'
|
||||||
lite_sources += 'api/dirmonitor/fsevents.c'
|
lite_sources += 'api' / 'dirmonitor' / 'fsevents.c'
|
||||||
elif dirmonitor_backend == 'kqueue'
|
elif dirmonitor_backend == 'kqueue'
|
||||||
lite_sources += 'api/dirmonitor/kqueue.c'
|
lite_sources += 'api' / 'dirmonitor' / 'kqueue.c'
|
||||||
libkqueue_dep = dependency('libkqueue', required : false)
|
libkqueue_dep = dependency('libkqueue', required : false)
|
||||||
if libkqueue_dep.found()
|
if libkqueue_dep.found()
|
||||||
lite_deps += libkqueue_dep
|
lite_deps += libkqueue_dep
|
||||||
endif
|
endif
|
||||||
elif dirmonitor_backend == 'inodewatcher'
|
elif dirmonitor_backend == 'inodewatcher'
|
||||||
add_languages('cpp')
|
add_languages('cpp')
|
||||||
lite_sources += 'api/dirmonitor/inodewatcher.cpp'
|
lite_sources += 'api' / 'dirmonitor' / 'inodewatcher.cpp'
|
||||||
elif dirmonitor_backend == 'win32'
|
elif dirmonitor_backend == 'win32'
|
||||||
lite_sources += 'api/dirmonitor/win32.c'
|
lite_sources += 'api' / 'dirmonitor' / 'win32.c'
|
||||||
else
|
else
|
||||||
lite_sources += 'api/dirmonitor/dummy.c'
|
lite_sources += 'api' / 'dirmonitor' / 'dummy.c'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
message('dirmonitor_backend: @0@'.format(dirmonitor_backend))
|
message('dirmonitor_backend: @0@'.format(dirmonitor_backend))
|
||||||
|
@ -60,8 +60,8 @@ message('dirmonitor_backend: @0@'.format(dirmonitor_backend))
|
||||||
lite_rc = []
|
lite_rc = []
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
windows = import('windows')
|
windows = import('windows')
|
||||||
lite_rc += windows.compile_resources('../resources/icons/icon.rc')
|
lite_rc += windows.compile_resources('..' / 'resources' / 'icons' / 'icon.rc')
|
||||||
lite_rc += windows.compile_resources('../resources/windows/manifest.rc')
|
lite_rc += windows.compile_resources('..' / 'resources' / 'windows' / 'manifest.rc')
|
||||||
elif host_machine.system() == 'darwin'
|
elif host_machine.system() == 'darwin'
|
||||||
lite_sources += 'bundle_open.m'
|
lite_sources += 'bundle_open.m'
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue