mkxp-z/meson.build

38 lines
1.1 KiB
Meson
Raw Normal View History

2019-07-30 09:17:20 -04:00
project('mkxp', 'cpp', version: '1.0')
2019-07-29 07:56:45 -04:00
xxd = find_program('xxd')
binding_dir = 'binding-' + get_option('binding')
host_system = host_machine.system()
2019-07-29 08:20:40 -04:00
if get_option('workdir_current') == true
add_project_arguments('-DWORKDIR_CURRENT', language: 'cpp')
endif
2019-07-29 08:38:48 -04:00
add_project_arguments('-DBINDING_' + get_option('binding').to_upper(), language: 'cpp')
2019-07-29 07:56:45 -04:00
subdir('src')
subdir(binding_dir)
subdir('shader')
subdir('assets')
all_sources = [main_headers, main_source, binding_headers, binding_source, processed_shaders, processed_assets]
2019-07-30 09:17:20 -04:00
include_dirs = [include_directories('src', binding_dir)]
2019-07-29 07:56:45 -04:00
linker_args = []
if host_system == 'windows'
subdir('windows')
all_sources += windows_resources
2019-07-30 09:17:20 -04:00
include_dirs += include_directories('windows')
2019-07-29 07:56:45 -04:00
elif host_system == 'darwin'
if meson.get_compiler('cpp').get_id() == 'clang'
add_project_arguments(['-std=c++11','-stdlib=libc++'], language: 'cpp')
endif
endif
2019-07-30 09:17:20 -04:00
executable('@0@-@1@_@2@'.format(meson.project_name(), host_system, host_machine.cpu_family()),
2019-07-29 07:56:45 -04:00
sources: all_sources,
dependencies: [main_dependencies, binding_dependencies],
2019-07-30 09:17:20 -04:00
include_directories: include_dirs
2019-07-29 07:56:45 -04:00
)