mkxp-z/meson.build

49 lines
1.3 KiB
Meson
Raw Normal View History

2019-08-19 08:59:35 -04:00
project('mkxp-z', 'cpp', 'c', version: '1.0', default_options: ['cpp_std=c++11'])
2019-07-29 07:56:45 -04:00
2019-08-04 12:00:20 -04:00
xxd = find_program('xxd', native: true)
2019-07-29 07:56:45 -04:00
host_system = host_machine.system()
2019-07-31 10:53:46 -04:00
compiler = meson.get_compiler('cpp')
2019-07-29 07:56:45 -04:00
if get_option('workdir_current')
2019-07-29 08:20:40 -04:00
add_project_arguments('-DWORKDIR_CURRENT', language: 'cpp')
endif
if get_option('fix_essentials')
add_project_arguments('-DUSE_ESSENTIALS_FIXES', language: 'cpp')
endif
if not get_option('console')
add_project_arguments('-DNO_CONSOLE', language: 'cpp')
endif
2019-07-29 07:56:45 -04:00
subdir('src')
2019-07-31 08:47:44 -04:00
subdir('binding')
2019-07-29 07:56:45 -04:00
subdir('shader')
subdir('assets')
2019-07-31 07:04:13 -04:00
all_sources = [main, bindings, processed_shaders, processed_assets]
2019-07-31 08:47:44 -04:00
include_dirs = [include_directories('src', 'binding')]
2019-07-29 07:56:45 -04:00
2019-08-19 08:59:35 -04:00
# Use cwalk
all_sources += files('cwalk/src/cwalk.c')
include_dirs += include_directories('cwalk/include')
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'
2019-07-31 15:33:02 -04:00
if compiler.get_id() == 'clang'
add_project_arguments('-stdlib=libc++', language: 'cpp')
2019-07-29 07:56:45 -04:00
endif
endif
2019-07-31 09:45:12 -04:00
executable(meson.project_name(),
2019-07-29 07:56:45 -04:00
sources: all_sources,
dependencies: [main_dependencies, binding_dependencies],
include_directories: include_dirs,
2019-08-09 07:46:51 -04:00
gui_app: (get_option('console') == false)
2019-07-29 07:56:45 -04:00
)