make binary dist. targets depends on stuff they'll be packaging

This commit is contained in:
Andrei Alexeyev 2019-04-19 23:40:39 +03:00
parent a8620b9ebe
commit c7a4bb9094
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
6 changed files with 45 additions and 29 deletions

View file

@ -51,7 +51,7 @@ if install_docs
]
foreach f : txt_docs
custom_target(f,
bindist_deps += custom_target(f,
command : [eolconv_command, host_eol_style, '@INPUT@', '@OUTPUT@'],
input : f,
output : f,
@ -62,7 +62,7 @@ if install_docs
foreach f : rst_docs
name = f.split('.')[0] + '.html'
custom_target(name,
bindist_deps += custom_target(name,
command : [eolconv_command, host_eol_style, '@INPUT@', '@OUTPUT@'],
input : rst_to_html.process(f),
output : name,
@ -73,7 +73,7 @@ if install_docs
endforeach
if angle_enabled and host_machine.system() == 'windows'
custom_target(f,
bindist_deps += custom_target(f,
command : [eolconv_command, host_eol_style, '@INPUT@', '@OUTPUT@'],
input : 'LICENSE.ANGLE',
output : 'LICENSE.txt',

View file

@ -298,6 +298,7 @@ if meson.is_cross_build()
endif
version_deps = []
bindist_deps = []
subdir('misc')
subdir('emscripten')
@ -308,6 +309,25 @@ subdir('xdg')
subdir('atlas')
subdir('src')
if macos_app_bundle
dmg_target = run_target('dmg',
command : dmg_command,
depends : bindist_deps,
)
endif
if host_machine.system() == 'windows'
nsis_target = run_target('nsis',
command : nsis_command,
depends : bindist_deps,
)
endif
zip_target = run_target('zip',
command: zip_command,
depends : bindist_deps,
)
summary = '''
Summary:

View file

@ -2,7 +2,7 @@
if macos_app_bundle
install_data(join_paths('icons', 'Taisei.icns'), install_dir : datadir)
version_deps += custom_target('macOS property list',
plist += custom_target('macOS property list',
command : [preprocess_command, '@INPUT@', '@OUTPUT@'],
build_always : true,
input : 'Info.plist.in',
@ -10,17 +10,21 @@ if macos_app_bundle
install : true,
install_dir : join_paths(bundle_dir, 'Contents')
)
version_deps += plist
bindist_deps += plist
endif
if angle_enabled and host_machine.system() == 'windows'
angle_launcher = 'taisei-angle.bat'
custom_target(angle_launcher,
angle_bat = custom_target(angle_launcher,
command : [eolconv_command, host_eol_style, '--no-bom', '@INPUT@', '@OUTPUT@'],
input : angle_launcher,
output : angle_launcher,
install : true,
install_dir : bindir,
)
bindist_deps += angle_bat
endif
glslc_test_file = files('glslc-test.frag.glsl')

View file

@ -76,7 +76,7 @@ foreach pkg : packages
endforeach
endforeach
elif package_data
custom_target(pkg_zip,
bindist_deps += custom_target(pkg_zip,
command : [pack_command,
pkg_path,
'@OUTPUT@',

View file

@ -51,20 +51,14 @@ else
dist_version_string = taisei_version_string
endif
if macos_app_bundle
dmg_script = files('macos-gen-dmg.py')
dmg_filename = 'Taisei-@0@-macOS.dmg'.format(dist_version_string)
dmg_target = run_target('dmg',
command: [python_thunk, dmg_script, join_paths(meson.build_root(), dmg_filename), meson.build_root()],
)
endif
dmg_script = files('macos-gen-dmg.py')
dmg_filename = 'Taisei-@0@-macOS.dmg'.format(dist_version_string)
dmg_command = [python_thunk, dmg_script, join_paths(meson.build_root(), dmg_filename), meson.build_root()]
angle_enabled = get_option('install_angle')
if host_machine.system() == 'windows'
nsis_script = files('win-gen-nsis.py')
nsis_command = [python_thunk, nsis_script]
nsis_filename = 'Taisei-@0@-setup-@1@.exe'.format(dist_version_string, host_machine.cpu_family())
nsis_outpath = join_paths(meson.build_root(), nsis_filename)
@ -84,25 +78,21 @@ if host_machine.system() == 'windows'
nsis_defs += '-DUSE_ANGLE=0'
endif
nsis_target = run_target('nsis',
command: [
nsis_command,
common_taiseilib_args,
common_taiseilib_defs,
nsis_defs,
meson.build_root(),
files('taisei.nsi.in')
],
)
nsis_command = [
python_thunk,
nsis_script,
common_taiseilib_args,
common_taiseilib_defs,
nsis_defs,
meson.build_root(),
files('taisei.nsi.in')
]
endif
zip_script = files('gen-zip.py')
zip_command = [python_thunk, zip_script]
zip_filename = 'Taisei-@0@-@1@-@2@.zip'.format(dist_version_string, host_machine.system(), host_machine.cpu_family())
zip_outpath = join_paths(meson.build_root(), zip_filename)
zip_target = run_target('zip',
command: [zip_command, meson.build_root(), zip_outpath],
)
zip_command = [python_thunk, zip_script, meson.build_root(), zip_outpath]
gen_atlas_script = files('gen-atlas.py')
gen_atlas_command = [python_thunk, gen_atlas_script]

View file

@ -234,4 +234,6 @@ else
install : true,
install_dir : bindir,
)
bindist_deps += taisei
endif