mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[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:
@@ -40,6 +40,12 @@ if (APPLE)
|
|||||||
target_link_libraries(DirectVulkanSanityTest PRIVATE objc)
|
target_link_libraries(DirectVulkanSanityTest PRIVATE objc)
|
||||||
target_link_libraries(DirectVulkanSanityTest PRIVATE ${QUARTZCORE_FRAMEWORK})
|
target_link_libraries(DirectVulkanSanityTest PRIVATE ${QUARTZCORE_FRAMEWORK})
|
||||||
endif()
|
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)
|
target_compile_definitions(DirectVulkanSanityTest PRIVATE -DNOMINMAX)
|
||||||
|
|
||||||
include(GoogleTest)
|
include(GoogleTest)
|
||||||
|
|||||||
Reference in New Issue
Block a user