Thanks to https://aur.archlinux.org/cgit/aur.git/tree/use-system-libs.patch?h=xemu --- a/meson.build +++ b/meson.build @@ -1180,11 +1180,7 @@ endif have_vhost_user_gpu = have_vhost_user_gpu and virgl.found() and opengl.found() and gbm.found() -tomllib = static_library('tomlpp', sources: files('toml.cpp'), - include_directories: 'tomlplusplus/include') -toml = declare_dependency(compile_args: ['-DTOML_HEADER_ONLY=0'], - include_directories: 'tomlplusplus/include', - link_with: tomllib) +toml = dependency('tomlplusplus') genconfig = declare_dependency(include_directories: 'genconfig') --- a/ui/thirdparty/meson.build +++ b/ui/thirdparty/meson.build @@ -60,7 +60,7 @@ 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') httplib = declare_dependency(include_directories: 'httplib') libfatx = static_library('fatx', sources: 'fatx/fatx.c') --- a/ui/xui/reporting.cc +++ b/ui/xui/reporting.cc @@ -24,7 +24,7 @@ #include "reporting.hh" #define CPPHTTPLIB_OPENSSL_SUPPORT 1 #include -#include +#include using json = nlohmann::json; #define DEBUG_COMPAT_SERVICE 0