Put msquic.dll where the QUIC native test build's loader needs it (Windows)
Running QUIC Cut 3's Windows leg exposed the same class of defect Linux
had at 5533c34: CULTMESH_QUIC_BUILD_TESTS has never had its own packaging
step on Windows, and build-quic-native.ps1's copy of msquic.dll only
lands in the final packaged output directory, never beside the test
binary in the CMake build tree.
Unlike the Linux failure, this one did not fail loudly. gamecult_mesh_quic_native.dll
imports msquic.dll by name, and Windows DLL search falls through to PATH
when the importing binary's own directory doesn't have it. This
workstation has an unrelated msquic.dll on PATH from the Windows
Performance Toolkit (529,480 bytes, unversioned) that is not the pinned
Microsoft.Native.Quic.MsQuic.OpenSSL 2.5.9 build (4,181,856 bytes). Every
asserts-build scenario ran clean against that wrong binary before this
fix, with no error to say so.
Mirrors the Linux POST_BUILD fix: CMake already receives MSQUIC_ROOT, so
the test target now copies msquic.dll from MSQUIC_ROOT/bin/x64 beside
itself instead of leaving the loader to guess.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
6e8362b7dc
commit
f3aae704e9
1 changed files with 15 additions and 1 deletions
|
|
@ -81,7 +81,21 @@ if(CULTMESH_QUIC_BUILD_TESTS)
|
|||
endif()
|
||||
set_target_properties(cultmesh_quic_native_tests PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
if(NOT WIN32)
|
||||
if(WIN32)
|
||||
# gamecult_mesh_quic_native.dll imports msquic.dll, and the scenario
|
||||
# runner loads it from its own directory (or PATH) at process start, not
|
||||
# from MSQUIC_ROOT. build-quic-native.ps1's packaged output gets a copy
|
||||
# from its own recipe; a test build has no packaging step, so without this
|
||||
# the loader falls through to whatever msquic.dll happens to already be on
|
||||
# PATH — silently running the scenarios against an unpinned, wrong-version
|
||||
# MsQuic instead of failing to start. CMake already knows MSQUIC_ROOT, so
|
||||
# it places the pinned DLL itself instead of leaving the reader to guess
|
||||
# why a scenario passed against the wrong binary.
|
||||
add_custom_command(TARGET cultmesh_quic_native_tests POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${MSQUIC_ROOT}/bin/x64/msquic.dll"
|
||||
"$<TARGET_FILE_DIR:cultmesh_quic_native_tests>/msquic.dll")
|
||||
else()
|
||||
target_link_libraries(cultmesh_quic_native_tests PRIVATE pthread)
|
||||
# The linker resolves the bridge's own NEEDED libmsquic.so.2 while linking
|
||||
# this executable, and the runtime copy only lands beside the binaries after
|
||||
|
|
|
|||
Loading…
Reference in a new issue