diff --git a/meson.build b/meson.build index 7cd48b8ded..bbf69d43e3 100644 --- a/meson.build +++ b/meson.build @@ -3550,11 +3550,9 @@ if have_libvduse libvduse = libvduse_proj.get_variable('libvduse_dep') endif -tomlplusplus_proj = subproject('tomlplusplus', default_options: ['default_library=static']) -tomlplusplus = tomlplusplus_proj.get_variable('tomlplusplus_dep') +tomlplusplus = dependency('tomlplusplus', fallback: ['tomlplusplus', 'tomlplusplus_dep'], default_options: ['default_library=static']) -xxhash_proj = subproject('xxhash', default_options: ['default_library=static']) -xxhash = xxhash_proj.get_variable('xxhash_dep') +xxhash = dependency('libxxhash', fallback: ['xxhash', 'xxhash_dep'], default_options: ['default_library=static']) ##################### # Generated sources # diff --git a/ui/thirdparty/json/json.hpp b/ui/thirdparty/json/nlohmann/json.hpp similarity index 100% rename from ui/thirdparty/json/json.hpp rename to ui/thirdparty/json/nlohmann/json.hpp diff --git a/ui/thirdparty/meson.build b/ui/thirdparty/meson.build index afd6e59677..8b1a88411b 100644 --- a/ui/thirdparty/meson.build +++ b/ui/thirdparty/meson.build @@ -29,7 +29,10 @@ endif libfpng = static_library('fpng', sources: 'fpng/fpng.cpp', cpp_args: libfpng_cpp_args) fpng = declare_dependency(include_directories: 'fpng', link_with: libfpng) -json = declare_dependency(include_directories: 'json') +json = dependency('nlohmann_json', required: false) +if not json.found() + json = declare_dependency(include_directories: 'json') +endif -libfatx = static_library('fatx', sources: 'fatx/fatx.c') +libfatx = static_library('fatx', sources: files('fatx/fatx.c') + genh) fatx = declare_dependency(include_directories: 'fatx', link_with: libfatx) diff --git a/ui/xui/reporting.cc b/ui/xui/reporting.cc index eb4f8192ac..2b59281ab9 100644 --- a/ui/xui/reporting.cc +++ b/ui/xui/reporting.cc @@ -26,7 +26,7 @@ #include #include #include "reporting.hh" -#include +#include using json = nlohmann::json; static const char *compat_report_endpoint_url = "https://reports.xemu.app/compatibility";