diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/angle/cmake-buildsystem/PlatformWin.cmake | |
Diffstat (limited to 'vcpkg/ports/angle/cmake-buildsystem/PlatformWin.cmake')
| -rw-r--r-- | vcpkg/ports/angle/cmake-buildsystem/PlatformWin.cmake | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/vcpkg/ports/angle/cmake-buildsystem/PlatformWin.cmake b/vcpkg/ports/angle/cmake-buildsystem/PlatformWin.cmake new file mode 100644 index 0000000..ca08a4f --- /dev/null +++ b/vcpkg/ports/angle/cmake-buildsystem/PlatformWin.cmake @@ -0,0 +1,68 @@ +# We're targeting Windows 10 which will have DirectX 11 on it so require that +# but make DirectX 9 optional + +list(APPEND ANGLE_DEFINITIONS + GL_APICALL= + GL_API= + NOMINMAX +) + +# We're targeting Windows 10 which will have DirectX 11 +list(APPEND ANGLE_SOURCES + ${d3d11_backend_sources} + ${d3d_shared_sources} + + ${angle_translator_hlsl_sources} + + ${libangle_gpu_info_util_sources} + ${libangle_gpu_info_util_win_sources} +) + +list(APPEND ANGLE_DEFINITIONS + ANGLE_ENABLE_D3D11 + ANGLE_ENABLE_HLSL + # VCPKG EDIT: add ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" +) + +# https://issues.angleproject.org/issues/345274916 +list(APPEND ANGLEGLESv2_LIBRARIES dxguid dxgi synchronization) + +if(NOT angle_is_winuwp) # vcpkg EDIT: Exclude DirectX 9 on UWP + # DirectX 9 support should be optional but ANGLE will not compile without it + list(APPEND ANGLE_SOURCES ${d3d9_backend_sources}) + list(APPEND ANGLE_DEFINITIONS ANGLE_ENABLE_D3D9) + list(APPEND ANGLEGLESv2_LIBRARIES d3d9) +endif() + +# VCPKG EDITS: + +# Do not specify library type here + +# Handle angle_enable_d3d11_compositor_native_window defines + +if(angle_enable_d3d11_compositor_native_window) + list(APPEND ANGLE_DEFINITIONS ANGLE_ENABLE_D3D11_COMPOSITOR_NATIVE_WINDOW) +endif() + +# OpenGL backend + +if(USE_OPENGL) + # Enable GLSL compiler output. + list(APPEND ANGLE_DEFINITIONS ANGLE_ENABLE_GLSL) + + if(USE_ANGLE_EGL OR ENABLE_WEBGL) + list(APPEND ANGLE_SOURCES + ${gl_backend_sources} + + ${libangle_gl_egl_dl_sources} + ${libangle_gl_egl_sources} + ${libangle_gl_sources} + ) + + list(APPEND ANGLE_DEFINITIONS + ANGLE_ENABLE_OPENGL + ANGLE_ENABLE_GL_DESKTOP_BACKEND + ) + endif() +endif() |