Switch to using a meson generator instead of a custom_target.
This commit is contained in:
parent
2fc701723a
commit
15b16071c9
2 changed files with 5 additions and 3 deletions
3
src/flappyBird/generateAssets.py
Normal file → Executable file
3
src/flappyBird/generateAssets.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from PIL import Image
|
||||
|
@ -14,7 +15,7 @@ input = Path(args.input)
|
|||
output = Path(args.output)
|
||||
|
||||
if not input.exists():
|
||||
print("Input " + str(path.absolute()) + " not found.")
|
||||
print("Input " + str(input.absolute()) + " not found.")
|
||||
raise SystemExit(1)
|
||||
|
||||
hexList = list()
|
||||
|
|
|
@ -5,8 +5,9 @@ flappy_sources = [
|
|||
'MainMenu.cc'
|
||||
]
|
||||
|
||||
python3 = find_program('python3')
|
||||
bird = custom_target('bird', output: 'birdSprite.cc', input: ['generateAssets.py', 'assets/yellowbird-downflap.png'], command: [python3, '@INPUT0@', 'bird', '@INPUT1@', '@OUTPUT@'])
|
||||
assets = find_program('generateAssets.py')
|
||||
asset_gen = generator(assets, output: '@BASENAME@.cc', arguments: ['@EXTRA_ARGS@', '@INPUT@', '@OUTPUT@'])
|
||||
bird = asset_gen.process('assets/yellowbird-downflap.png', extra_args: ['bird'])
|
||||
|
||||
flappy_bird = static_library('flappyBird', [flappy_sources, bird], dependencies: deps, include_directories: incdirs)
|
||||
flappy_dep = declare_dependency(link_with: [flappy_bird], include_directories: incdirs)
|
||||
|
|
Loading…
Reference in a new issue