File jsoncpp-1.9.5-external-jsontestrunner.patch of Package mingw64-jsoncpp

diff --git a/meson.build b/meson.build
index 561b41c..c81d4df 100644
--- a/meson.build
+++ b/meson.build
@@ -112,27 +112,34 @@ endif
 
 python = find_program('python3')
 
-jsoncpp_test = executable(
-  'jsoncpp_test', files([
-    'src/test_lib_json/jsontest.cpp',
-    'src/test_lib_json/main.cpp',
-    'src/test_lib_json/fuzz.cpp',
-  ]),
-  include_directories : jsoncpp_include_directories,
-  link_with : jsoncpp_lib,
-  install : false,
-  cpp_args: dll_import_flag)
-test(
-  'unittest_jsoncpp_test',
-  jsoncpp_test)
+jsoncpp_test = get_option('jsoncpp_test')
+if jsoncpp_test == ''
+    jsoncpp_test = executable(
+    'jsoncpp_test', files([
+        'src/test_lib_json/jsontest.cpp',
+        'src/test_lib_json/main.cpp',
+        'src/test_lib_json/fuzz.cpp',
+    ]),
+    include_directories : jsoncpp_include_directories,
+    link_with : jsoncpp_lib,
+    install : false,
+    cpp_args: dll_import_flag)
+    test(
+    'unittest_jsoncpp_test',
+    jsoncpp_test)
+endif
+
+jsontestrunner = get_option('jsontestrunner')
+if jsontestrunner == ''
+    jsontestrunner = executable(
+    'jsontestrunner',
+    'src/jsontestrunner/main.cpp',
+    include_directories : jsoncpp_include_directories,
+    link_with : jsoncpp_lib,
+    install : false,
+    cpp_args: dll_import_flag)
+endif
 
-jsontestrunner = executable(
-  'jsontestrunner',
-  'src/jsontestrunner/main.cpp',
-  include_directories : jsoncpp_include_directories,
-  link_with : jsoncpp_lib,
-  install : false,
-  cpp_args: dll_import_flag)
 test(
   'unittest_jsontestrunner',
   python,
diff --git a/meson_options.txt b/meson_options.txt
index 9c215ae..fca1d26 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -3,3 +3,13 @@ option(
   type : 'boolean',
   value : true,
   description : 'Enable building tests')
+option(
+  'jsontestrunner',
+  type : 'string',
+  value : '',
+  description : 'Use external json test runner executable')
+option(
+  'jsoncpp_test',
+  type : 'string',
+  value : '',
+  description : 'Use external json test cpp executable')
openSUSE Build Service is sponsored by