Codechange: vendor the nlohmann-json library (#11290)

(cherry picked from commit ba67f39db6)

# Conflicts:
#	.github/workflows/ci-build.yml
#	CMakeLists.txt
#	COMPILING.md
#	src/os/macosx/survey_osx.cpp
#	src/os/windows/survey_win.cpp
#	src/script/api/script_admin.cpp
#	src/script/api/script_event_types.cpp
#	src/tests/test_script_admin.cpp
This commit is contained in:
Jonathan G Rennison
2023-11-17 19:20:35 +00:00
parent af1150182a
commit cf4cf5c08f
20 changed files with 24631 additions and 141 deletions

View File

@@ -4,7 +4,6 @@
OpenTTD makes use of the following external libraries:
- (required) nlohmann-json: JSON handling
- (encouraged) zlib: (de)compressing of old (0.3.0-1.0.5) savegames, content downloads,
heightmaps
- (encouraged) liblzma: (de)compressing of savegames (1.1.0 and later)
@@ -55,14 +54,13 @@ the `static` versions, and OpenTTD currently needs the following dependencies:
- libzstd
- libpng
- lzo
- nlohmann-json
- zlib
To install both the x64 (64bit) and x86 (32bit) variants (though only one is necessary), you can use:
```ps
.\vcpkg install liblzma:x64-windows-static zstd:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static nlohmann-json:x64-windows-static zlib:x64-windows-static
.\vcpkg install liblzma:x86-windows-static zstd:x86-windows-static libpng:x86-windows-static lzo:x86-windows-static nlohmann-json:x86-windows-static zlib:x86-windows-static
.\vcpkg install liblzma:x64-windows-static zstd:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static zlib:x64-windows-static
.\vcpkg install liblzma:x86-windows-static zstd:x86-windows-static libpng:x86-windows-static lzo:x86-windows-static zlib:x86-windows-static
```
You can open the folder (as a CMake project). CMake will be detected, and you can compile from there.