From c1f3592e46b9a7a9a4e0e69c0932cfc93030693e Mon Sep 17 00:00:00 2001 From: Sergio Martin Date: Thu, 8 Feb 2024 19:30:37 +0100 Subject: [PATCH 1/2] Fixing build in jaffarPlus --- meson.build | 16 +++++++++++++++- source/meson.build | 6 +----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 4982bc7..2b9a9d6 100644 --- a/meson.build +++ b/meson.build @@ -13,6 +13,15 @@ subdir('source') # Common application flags commonCompileArgs = [ '-Wfatal-errors', '-Wall'] +# Common includes +commonIncludes = include_directories(['extern']) + +# Common sources +commonSources = [ + 'extern/jaffarCommon/extern/metrohash128/metrohash128.cpp', + 'extern/jaffarCommon/extern/xdelta3/xdelta3.c', + ] + # Building playback tool quickerNESPlayerSrc = [ @@ -30,7 +39,8 @@ if meson.is_subproject() == false cpp_args : [ commonCompileArgs, '-DNCURSES' ], dependencies : [ quickerNESDependency, toolDependency, dependency('sdl2'), dependency('SDL2_image') ], link_args : [ '-lncurses' ], - sources : quickerNESPlayerSrc + sources : [ commonSources, quickerNESPlayerSrc ], + include_directories : [ commonIncludes ] ) endif @@ -40,6 +50,8 @@ if meson.is_subproject() == false 'source/tester.cpp', cpp_args : [ commonCompileArgs, '-Werror' ], dependencies : [ quickerNESDependency, toolDependency ], + sources : [ commonSources ], + include_directories : [ commonIncludes ] ) # Building tester tool for the original QuickNES @@ -48,6 +60,8 @@ if meson.is_subproject() == false 'source/tester.cpp', cpp_args : [ commonCompileArgs, '-w', '-DDISABLE_AUTO_FILE', '-D__LIBRETRO__', '-DNDEBUG', '-DBLARGG_NONPORTABLE' ], dependencies : [ quickNESDependency, toolDependency ], + sources : [ commonSources ], + include_directories : [ commonIncludes ] ) # Building tests diff --git a/source/meson.build b/source/meson.build index 5cb3e14..d4ff46e 100644 --- a/source/meson.build +++ b/source/meson.build @@ -5,9 +5,5 @@ subdir('quickerNES') # Tool Configuration toolDependency = declare_dependency( - include_directories : include_directories(['.', '../extern']), - sources : [ - '../extern/jaffarCommon/extern/metrohash128/metrohash128.cpp', - '../extern/jaffarCommon/extern/xdelta3/xdelta3.c', - ] + include_directories : include_directories(['.']), ) From 318e1822bda4e2fdb44ec17439b258ae0263a788 Mon Sep 17 00:00:00 2001 From: Sergio Martin Date: Thu, 8 Feb 2024 19:30:37 +0100 Subject: [PATCH 2/2] Fixing build in jaffarPlus --- meson.build | 16 +++++++++++++++- source/meson.build | 6 +----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 4982bc7..2b9a9d6 100644 --- a/meson.build +++ b/meson.build @@ -13,6 +13,15 @@ subdir('source') # Common application flags commonCompileArgs = [ '-Wfatal-errors', '-Wall'] +# Common includes +commonIncludes = include_directories(['extern']) + +# Common sources +commonSources = [ + 'extern/jaffarCommon/extern/metrohash128/metrohash128.cpp', + 'extern/jaffarCommon/extern/xdelta3/xdelta3.c', + ] + # Building playback tool quickerNESPlayerSrc = [ @@ -30,7 +39,8 @@ if meson.is_subproject() == false cpp_args : [ commonCompileArgs, '-DNCURSES' ], dependencies : [ quickerNESDependency, toolDependency, dependency('sdl2'), dependency('SDL2_image') ], link_args : [ '-lncurses' ], - sources : quickerNESPlayerSrc + sources : [ commonSources, quickerNESPlayerSrc ], + include_directories : [ commonIncludes ] ) endif @@ -40,6 +50,8 @@ if meson.is_subproject() == false 'source/tester.cpp', cpp_args : [ commonCompileArgs, '-Werror' ], dependencies : [ quickerNESDependency, toolDependency ], + sources : [ commonSources ], + include_directories : [ commonIncludes ] ) # Building tester tool for the original QuickNES @@ -48,6 +60,8 @@ if meson.is_subproject() == false 'source/tester.cpp', cpp_args : [ commonCompileArgs, '-w', '-DDISABLE_AUTO_FILE', '-D__LIBRETRO__', '-DNDEBUG', '-DBLARGG_NONPORTABLE' ], dependencies : [ quickNESDependency, toolDependency ], + sources : [ commonSources ], + include_directories : [ commonIncludes ] ) # Building tests diff --git a/source/meson.build b/source/meson.build index 5cb3e14..d4ff46e 100644 --- a/source/meson.build +++ b/source/meson.build @@ -5,9 +5,5 @@ subdir('quickerNES') # Tool Configuration toolDependency = declare_dependency( - include_directories : include_directories(['.', '../extern']), - sources : [ - '../extern/jaffarCommon/extern/metrohash128/metrohash128.cpp', - '../extern/jaffarCommon/extern/xdelta3/xdelta3.c', - ] + include_directories : include_directories(['.']), )