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.
38 lines
946 B
38 lines
946 B
project('myapp', 'cpp') |
|
|
|
sdl = dependency('sdl2', required : host.name() != 'windows') |
|
|
|
if meson.get_compiler('cpp').get_id() != 'msvc' |
|
add_global_arguments('-std=c++11', language : 'cpp') |
|
endif |
|
|
|
if host.name() == 'darwin' |
|
install_data('myapp.sh', |
|
install_dir : 'Contents/MacOS') |
|
|
|
install_data('myapp.icns', |
|
install_dir : 'Contents/Resources') |
|
|
|
install_data('Info.plist', |
|
install_dir : 'Contents') |
|
|
|
meson.set_install_script('osx_bundler.sh') |
|
endif |
|
|
|
if host.name() == 'linux' |
|
install_data('myapp.sh', install_dir : '.') |
|
meson.set_install_script('linux_bundler.sh') |
|
endif |
|
|
|
extra_link_args = [] |
|
|
|
if host.name() == 'windows' |
|
str = '-I@0@/@1@'.format(meson.current_build_dir(), 'SDL2-2.0.3/include') |
|
add_global_arguments(str, language : 'cpp') |
|
extra_link_args = ['/SUBSYSTEM:CONSOLE', 'SDL2main.lib', 'SDL2.lib'] |
|
endif |
|
|
|
prog = executable('myapp', 'myapp.cpp', |
|
dependencies : sdl, |
|
link_args : extra_link_args, |
|
install : true)
|
|
|