[Fix] (MG_Test/Backend/DirectVulkan): link the whole MobileGL_s archive on MSVC so dllimport-declared gl*/egl* references resolve against the in-library entry points

This commit is contained in:
2026-07-17 21:32:17 -04:00
parent abfda60ff1
commit c718d6bad8
@@ -40,6 +40,12 @@ if (APPLE)
target_link_libraries(DirectVulkanSanityTest PRIVATE objc)
target_link_libraries(DirectVulkanSanityTest PRIVATE ${QUARTZCORE_FRAMEWORK})
endif()
if (MSVC)
# The GLES headers declare gl* as dllimport on Windows, so objects like GetProcAddress.cpp
# reference __imp_gl*. Those resolve against the in-library GL entry-point definitions only
# if their objects are part of the link; pull the whole static library like the DLL does.
target_link_options(DirectVulkanSanityTest PRIVATE /WHOLEARCHIVE:MobileGL_s)
endif()
target_compile_definitions(DirectVulkanSanityTest PRIVATE -DNOMINMAX)
include(GoogleTest)