2024-01-09 19:12:22 +00:00
|
|
|
project('quickerNES','c','cpp',
|
|
|
|
version: '1.0.0',
|
|
|
|
license: 'GPL-3.0-only',
|
2024-03-06 15:21:04 +00:00
|
|
|
default_options : ['cpp_std=c++20', 'default_library=shared', 'buildtype=release'],
|
|
|
|
subproject_dir : 'extern'
|
2024-01-09 19:12:22 +00:00
|
|
|
)
|
|
|
|
|
2024-01-14 09:59:20 +00:00
|
|
|
# Loading dependencies
|
2024-01-14 09:31:17 +00:00
|
|
|
subdir('source')
|
2024-01-09 19:12:22 +00:00
|
|
|
|
2024-03-06 17:22:51 +00:00
|
|
|
# Do not build any targets if this is a subproject
|
|
|
|
if meson.is_subproject() == false
|
|
|
|
|
2024-01-14 09:31:17 +00:00
|
|
|
# Common application flags
|
2024-01-20 09:15:20 +00:00
|
|
|
commonCompileArgs = [ '-Wfatal-errors', '-Wall']
|
2024-01-09 19:12:22 +00:00
|
|
|
|
2024-03-06 15:21:04 +00:00
|
|
|
# Grabbing jaffarCommon dependency
|
2024-02-08 18:30:37 +00:00
|
|
|
|
2024-03-06 15:21:04 +00:00
|
|
|
jaffarCommonSubproject = subproject('jaffarCommon')
|
|
|
|
jaffarCommonDependency = jaffarCommonSubproject.get_variable('jaffarCommonDependency')
|
2024-02-08 18:30:37 +00:00
|
|
|
|
2024-03-06 15:21:04 +00:00
|
|
|
# Grabbing hqn dependency
|
|
|
|
|
|
|
|
hqnSubproject = subproject('hqn')
|
|
|
|
hqnDependency = hqnSubproject.get_variable('hqnDependency')
|
2024-01-09 19:12:22 +00:00
|
|
|
|
2024-03-06 15:21:04 +00:00
|
|
|
# Building playback tool
|
2024-01-27 19:32:23 +00:00
|
|
|
if get_option('buildPlayer') == true
|
|
|
|
executable('player',
|
|
|
|
'source/player.cpp',
|
|
|
|
cpp_args : [ commonCompileArgs, '-DNCURSES' ],
|
2024-03-06 15:21:04 +00:00
|
|
|
dependencies : [ jaffarCommonDependency, quickerNESDependency, toolDependency, dependency('sdl2'), dependency('SDL2_image'), hqnDependency ],
|
|
|
|
link_args : [ '-lncurses' ]
|
2024-01-27 19:32:23 +00:00
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Building tester tool for QuickerNES
|
|
|
|
|
|
|
|
quickerNESTester = executable('quickerNESTester',
|
|
|
|
'source/tester.cpp',
|
|
|
|
cpp_args : [ commonCompileArgs, '-Werror' ],
|
2024-03-06 15:21:04 +00:00
|
|
|
dependencies : [ jaffarCommonDependency, quickerNESDependency, toolDependency ]
|
2024-01-16 21:43:03 +00:00
|
|
|
)
|
2024-01-11 19:23:32 +00:00
|
|
|
|
2024-01-27 19:32:23 +00:00
|
|
|
# Building tester tool for the original QuickNES
|
2024-01-12 18:14:57 +00:00
|
|
|
|
2024-02-08 18:53:29 +00:00
|
|
|
if get_option('buildQuickNES') == true
|
2024-01-27 19:32:23 +00:00
|
|
|
quickNESTester = executable('quickNESTester',
|
|
|
|
'source/tester.cpp',
|
|
|
|
cpp_args : [ commonCompileArgs, '-w', '-DDISABLE_AUTO_FILE', '-D__LIBRETRO__', '-DNDEBUG', '-DBLARGG_NONPORTABLE' ],
|
2024-03-06 15:21:04 +00:00
|
|
|
dependencies : [ jaffarCommonDependency, quickNESDependency, toolDependency ]
|
2024-01-27 19:32:23 +00:00
|
|
|
)
|
2024-02-08 18:53:29 +00:00
|
|
|
endif
|
2024-01-14 09:59:20 +00:00
|
|
|
|
2024-01-27 19:32:23 +00:00
|
|
|
# Building tests
|
2024-02-08 18:53:29 +00:00
|
|
|
if get_option('buildQuickNES') == true
|
2024-01-27 19:32:23 +00:00
|
|
|
subdir('tests')
|
2024-02-08 18:53:29 +00:00
|
|
|
endif
|
|
|
|
|
2024-01-27 19:32:23 +00:00
|
|
|
endif # If not subproject
|