mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Enable use of cpp-httplib
Add cpp-httplib to library build scripts and enable it's use in premake. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
9c1f133118
commit
7e575aa855
5 changed files with 32 additions and 2 deletions
|
|
@ -234,6 +234,25 @@ extern_lib_defs = {
|
|||
})
|
||||
end,
|
||||
},
|
||||
cpp_httplib = {
|
||||
compile_settings = function()
|
||||
if not _OPTIONS["with-system-cpp-httplib"] then
|
||||
add_source_include_paths("cpp-httplib")
|
||||
end
|
||||
end,
|
||||
link_settings = function()
|
||||
if not _OPTIONS["with-system-cpp-httplib"] then
|
||||
add_source_lib_paths("cpp-httplib")
|
||||
end
|
||||
add_default_links({
|
||||
win_names = { "cpp-httplib" },
|
||||
unix_names = { "cpp-httplib" },
|
||||
osx_names = { "cpp-httplib" },
|
||||
dbg_suffix = "",
|
||||
no_delayload = 1,
|
||||
})
|
||||
end,
|
||||
},
|
||||
cxxtest = {
|
||||
compile_settings = function()
|
||||
if not _OPTIONS["with-system-cxxtest"] then
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ newoption { category = "Pyrogenesis", trigger = "sanitize-address", description
|
|||
newoption { category = "Pyrogenesis", trigger = "sanitize-thread", description = "Enable TSAN if available" }
|
||||
newoption { category = "Pyrogenesis", trigger = "sanitize-undefined-behaviour", description = "Enable UBSAN if available" }
|
||||
newoption { category = "Pyrogenesis", trigger = "strip-binaries", description = "Strip created binaries" }
|
||||
newoption { category = "Pyrogenesis", trigger = "with-system-cpp-httplib", description = "Search standard paths for cpp-httplib, instead of using bundled copy" }
|
||||
newoption { category = "Pyrogenesis", trigger = "with-system-cxxtest", description = "Search standard paths for cxxtest, instead of using bundled copy" }
|
||||
newoption { category = "Pyrogenesis", trigger = "with-lto", description = "Enable Link Time Optimization (LTO)" }
|
||||
newoption { category = "Pyrogenesis", trigger = "with-system-mozjs", description = "Search standard paths for libmozjs128, instead of using bundled copy" }
|
||||
|
|
|
|||
|
|
@ -1236,6 +1236,10 @@ echo "Building Molten VK..."
|
|||
|
||||
export ARCH CXXFLAGS CFLAGS LDFLAGS CMAKE_FLAGS JOBS
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# shellcheck disable=SC2086
|
||||
./../source/cpp-httplib/build.sh $build_sh_options || die "cpp-httplib build failed"
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# shellcheck disable=SC2086
|
||||
./../source/cxxtest-4.4/build.sh $build_sh_options || die "cxxtest build failed"
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ EOF
|
|||
}
|
||||
|
||||
without_nvtt=false
|
||||
with_system_cpp_httplib=false
|
||||
with_system_cxxtest=false
|
||||
with_system_nvtt=false
|
||||
with_system_mozjs=false
|
||||
|
|
@ -59,6 +60,7 @@ while [ "$#" -gt 0 ]; do
|
|||
--fetch-only) build_sh_options="$build_sh_options --fetch-only" ;;
|
||||
--force-rebuild) build_sh_options="$build_sh_options --force-rebuild" ;;
|
||||
--without-nvtt) without_nvtt=true ;;
|
||||
--with-system-cpp-httplib) with_system_cpp_httplib=true ;;
|
||||
--with-system-cxxtest) with_system_cxxtest=true ;;
|
||||
--with-system-nvtt) with_system_nvtt=true ;;
|
||||
--with-system-mozjs) with_system_mozjs=true ;;
|
||||
|
|
@ -90,6 +92,10 @@ export MAKE JOBS
|
|||
# Build/update bundled external libraries
|
||||
echo "Building third-party dependencies..."
|
||||
|
||||
if [ "$with_system_cpp_httplib" = "false" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
./source/cpp-httplib/build.sh $build_sh_options || die "cpp-httplib build failed"
|
||||
fi
|
||||
if [ "$with_system_cxxtest" = "false" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
./source/cxxtest-4.4/build.sh $build_sh_options || die "cxxtest build failed"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ cd /D "%~dp0"
|
|||
|
||||
rem **SVN revision to checkout for windows-libs or windows-libs-amd64**
|
||||
rem **Update this line when you commit an update to windows-libs or windows-libs-amd64**
|
||||
set "svnrev=28275"
|
||||
set "svnrev=28278"
|
||||
|
||||
if "%1" == "--amd64" (
|
||||
set "LIBS_PATH=win64"
|
||||
|
|
@ -22,7 +22,7 @@ rem **Copy dependencies' binaries to binaries/system/**
|
|||
|
||||
rem static libs: boost fmt
|
||||
rem wxwidgets isn't provided and needs to be built manually
|
||||
set DIR_LIST=enet fcollada freetype gloox iconv icu libcurl libpng libsodium libxml2 microsoft miniupnpc nvtt openal sdl2 spidermonkey vorbis zlib
|
||||
set DIR_LIST=cpp-httplib enet fcollada freetype gloox iconv icu libcurl libpng libsodium libxml2 microsoft miniupnpc nvtt openal sdl2 spidermonkey vorbis zlib
|
||||
for %%d in (%DIR_LIST%) do (
|
||||
copy /y %LIBS_PATH%\%%d\bin\* ..\binaries\system\ || exit /b 1
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue