quickerNES/meson.build

71 lines
2.1 KiB
Meson
Raw Normal View History

project('quickerNES','c','cpp',
version: '1.0.0',
license: 'GPL-3.0-only',
default_options : ['cpp_std=c++20', 'default_library=shared', 'buildtype=release']
)
# Loading dependencies
2024-01-14 09:31:17 +00:00
subdir('source')
2024-01-14 09:31:17 +00:00
# Common application flags
commonCompileArgs = [ '-Wfatal-errors', '-Wall']
2024-02-08 18:30:37 +00:00
# Common includes
commonIncludes = include_directories(['extern'])
# Common sources
commonSources = [
'extern/jaffarCommon/extern/metrohash128/metrohash128.cpp',
'extern/jaffarCommon/extern/xdelta3/xdelta3.c',
]
2024-01-12 18:14:57 +00:00
# Building playback tool
quickerNESPlayerSrc = [
2024-01-10 19:11:49 +00:00
'extern/hqn/hqn.cpp',
'extern/hqn/hqn_gui_controller.cpp',
'extern/hqn/hqn_surface.cpp',
]
# Do not build any targets if this is a subproject
if meson.is_subproject() == false
if get_option('buildPlayer') == true
executable('player',
'source/player.cpp',
cpp_args : [ commonCompileArgs, '-DNCURSES' ],
dependencies : [ quickerNESDependency, toolDependency, dependency('sdl2'), dependency('SDL2_image') ],
link_args : [ '-lncurses' ],
2024-02-08 18:30:37 +00:00
sources : [ commonSources, quickerNESPlayerSrc ],
include_directories : [ commonIncludes ]
)
endif
# Building tester tool for QuickerNES
quickerNESTester = executable('quickerNESTester',
'source/tester.cpp',
cpp_args : [ commonCompileArgs, '-Werror' ],
dependencies : [ quickerNESDependency, toolDependency ],
2024-02-08 18:30:37 +00:00
sources : [ commonSources ],
include_directories : [ commonIncludes ]
)
2024-01-11 19:23:32 +00:00
# Building tester tool for the original QuickNES
2024-01-12 18:14:57 +00:00
if get_option('buildQuickNES') == true
quickNESTester = executable('quickNESTester',
'source/tester.cpp',
cpp_args : [ commonCompileArgs, '-w', '-DDISABLE_AUTO_FILE', '-D__LIBRETRO__', '-DNDEBUG', '-DBLARGG_NONPORTABLE' ],
dependencies : [ quickNESDependency, toolDependency ],
2024-02-08 18:30:37 +00:00
sources : [ commonSources ],
include_directories : [ commonIncludes ]
)
endif
# Building tests
if get_option('buildQuickNES') == true
subdir('tests')
endif
endif # If not subproject