meson: Migrate cpp-httplib submodule to a subproject

This commit is contained in:
Matt Borgerson 2024-12-31 17:24:15 -07:00 committed by mborgerson
parent 55118b4260
commit 084b40fc53
11 changed files with 17 additions and 12 deletions

3
.gitmodules vendored
View File

@ -79,6 +79,3 @@
[submodule "genconfig"]
path = genconfig
url = https://github.com/mborgerson/genconfig.git
[submodule "ui/thirdparty/httplib"]
path = ui/thirdparty/httplib
url = https://github.com/yhirose/cpp-httplib

2
configure vendored
View File

@ -237,7 +237,7 @@ else
git_submodules_action="ignore"
fi
git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash genconfig"
git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot util/xxHash genconfig"
git="git"
# Don't accept a target_list environment variable.

View File

@ -30,9 +30,9 @@ submodules="dtc meson ui/keycodemapdb"
submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
# xemu extras
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash genconfig"
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot util/xxHash genconfig"
subprojects="glslang SPIRV-Reflect volk VulkanMemoryAllocator nv2a_vsh_cpu tomlplusplus"
subprojects="glslang SPIRV-Reflect volk VulkanMemoryAllocator nv2a_vsh_cpu tomlplusplus cpp-httplib"
sub_deinit=""

View File

@ -197,10 +197,10 @@ Lib('implot', 'https://github.com/epezent/implot',
submodule=Submodule('ui/thirdparty/implot')
),
Lib('httplib', 'https://github.com/yhirose/cpp-httplib',
Lib('cpp-httplib', 'https://github.com/yhirose/cpp-httplib',
mit, 'https://raw.githubusercontent.com/yhirose/cpp-httplib/master/LICENSE',
ships_static=all_platforms,
submodule=Submodule('ui/thirdparty/httplib')
submodule=Submodule('subprojects/cpp-httplib.wrap')
),
Lib('noc', 'https://github.com/guillaumechereau/noc/blob/master/noc_file_dialog.h',

View File

@ -4,3 +4,4 @@ volk
VulkanMemoryAllocator
nv2a_vsh_cpu
tomlplusplus
cpp-httplib

View File

@ -0,0 +1,4 @@
[wrap-git]
url=https://github.com/yhirose/cpp-httplib
revision=0f1b62c2b3d0898cbab7aa685c2593303ffdc1a2
depth=1

@ -1 +0,0 @@
Subproject commit 0f1b62c2b3d0898cbab7aa685c2593303ffdc1a2

View File

@ -61,7 +61,13 @@ libfpng = static_library('fpng', sources: 'fpng/fpng.cpp', cpp_args: libfpng_cpp
fpng = declare_dependency(include_directories: 'fpng', link_with: libfpng)
json = declare_dependency(include_directories: 'json')
httplib = declare_dependency(include_directories: 'httplib', dependencies: targetos == 'windows' ? [crypt32] : [])
httplib_proj = subproject('cpp-httplib', default_options: ['cpp-httplib_openssl=enabled'])
httplib_deps = [httplib_proj.get_variable('cpp_httplib_dep')]
if targetos == 'windows'
httplib_deps += [crypt32]
endif
httplib = declare_dependency(dependencies: httplib_deps)
libfatx = static_library('fatx', sources: 'fatx/fatx.c')
fatx = declare_dependency(include_directories: 'fatx', link_with: libfatx)

View File

@ -22,7 +22,6 @@
#include <glib/gi18n.h>
#include <stdio.h>
#include "reporting.hh"
#define CPPHTTPLIB_OPENSSL_SUPPORT 1
#include <httplib.h>
#include <json.hpp>
using json = nlohmann::json;

View File

@ -40,7 +40,6 @@ const char *download_uri = "/xemu-project/xemu/releases/latest/download/xemu-win
FIXME
#endif
#define CPPHTTPLIB_OPENSSL_SUPPORT 1
#include <httplib.h>
#define DPRINTF(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__);