The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
957 B
36 lines
957 B
11 years ago
|
project('grabber', 'c')
|
||
|
|
||
|
# What this script does is NOT reliable. Simply adding a file in this directory
|
||
|
# will NOT make it automatically appear in the build. You have to manually
|
||
|
# re-invoke Meson (not just Ninja) for that to happen. The simplest way
|
||
|
# is to touch meson-private/coredata.dat.
|
||
|
|
||
|
# This is not the recommended way to do things, but if the tradeoffs are
|
||
|
# acceptable to you, then we're certainly not going to stop you. Just don't
|
||
|
# file bugs when it fails. :)
|
||
|
|
||
9 years ago
|
if build_machine.system() == 'windows'
|
||
11 years ago
|
c = run_command('grabber.bat')
|
||
11 years ago
|
grabber = find_program('grabber2.bat')
|
||
11 years ago
|
else
|
||
|
c = run_command('grabber.sh')
|
||
11 years ago
|
grabber = find_program('grabber.sh')
|
||
11 years ago
|
endif
|
||
|
|
||
11 years ago
|
|
||
|
# First test running command explicitly.
|
||
11 years ago
|
if c.returncode() != 0
|
||
|
error('Executing script failed.')
|
||
|
endif
|
||
|
|
||
|
newline = '''
|
||
|
'''
|
||
|
|
||
|
sources = c.stdout().strip().split(newline)
|
||
|
|
||
|
e = executable('prog', sources)
|
||
|
test('grabtest', e)
|
||
11 years ago
|
|
||
|
# Then test using program with find_program
|
||
|
subdir('subdir')
|