Vendor miniz 3.0.2 instead of downloading it

The release asset download returned HTTP 504 for hours and blocked the Windows
build. miniz (MIT) is two source files, so it now lives in third_party/miniz and
the public-tree check skips that unmodified third-party directory.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-08 11:19:02 +01:00
1 parent e01ac929ac
commit d2c5fade43
5 files changed
+9286 -5

No files matched your search

+3 -5
View File
@@ -284,12 +284,9 @@ if(MSVC)
endif()
# --- Game data launcher (src/launch): find, unpack and check the original game data ---------
# ZIP: miniz (MIT), 7z: the C decoder of the LZMA SDK (public domain), file dialog:
# ZIP: miniz 3.0.2 (MIT, vendored in third_party/miniz), 7z: the C decoder of the LZMA SDK (public domain), file dialog:
# nativefiledialog-extended (zlib). All pinned; fetched like SDL2.
include(FetchContent)
FetchContent_Declare(miniz
URL https://github.com/richgel999/miniz/releases/download/3.0.2/miniz-3.0.2.zip
URL_HASH SHA256=ada38db0b703a56d3dd6d57bf84a9c5d664921d870d8fea4db153979fb5332c5)
FetchContent_Declare(lzma_sdk
GIT_REPOSITORY https://github.com/ip7z/7zip.git
GIT_TAG 24.09
@@ -301,9 +298,10 @@ FetchContent_Declare(nfd
GIT_REPOSITORY https://github.com/btzy/nativefiledialog-extended.git
GIT_TAG v1.2.1
GIT_SHALLOW TRUE)
FetchContent_MakeAvailable(miniz lzma_sdk nfd)
FetchContent_MakeAvailable(lzma_sdk nfd)
add_library(bmh_miniz STATIC ${miniz_SOURCE_DIR}/miniz.c)
set(miniz_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/miniz") # vendored: no download that can fail
target_include_directories(bmh_miniz PUBLIC ${miniz_SOURCE_DIR})
set(BMH_LZMA_C ${lzma_sdk_SOURCE_DIR}/C)
add_library(bmh_7z STATIC