mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:09:00 +08:00
[angle] Fix mingw build (#19307)
* Fix import lib prefixes * Fix mingw build * x-add-version
This commit is contained in:
parent
25382e39f7
commit
a9613b5775
22
ports/angle/003-fix-mingw.patch
Normal file
22
ports/angle/003-fix-mingw.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/src/common/mathutil.h b/src/common/mathutil.h
|
||||
index 1d73bbf..c5b9cc8 100644
|
||||
--- a/src/common/mathutil.h
|
||||
+++ b/src/common/mathutil.h
|
||||
@@ -1073,7 +1073,7 @@ inline int BitCount(uint64_t bits)
|
||||
# endif // defined(_M_IX86) || defined(_M_X64)
|
||||
#endif // defined(_MSC_VER) && !defined(__clang__)
|
||||
|
||||
-#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__)
|
||||
+#if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__MINGW32__)
|
||||
inline int BitCount(uint32_t bits)
|
||||
{
|
||||
return __builtin_popcount(bits);
|
||||
@@ -1083,7 +1083,7 @@ inline int BitCount(uint64_t bits)
|
||||
{
|
||||
return __builtin_popcountll(bits);
|
||||
}
|
||||
-#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__)
|
||||
+#endif // defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) || defined(__MINGW32__)
|
||||
|
||||
inline int BitCount(uint8_t bits)
|
||||
{
|
@ -375,6 +375,9 @@ if(WIN32)
|
||||
"src/libANGLE/renderer/d3d/*.h"
|
||||
)
|
||||
list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest")
|
||||
if(MINGW)
|
||||
list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "CompositorNativeWindow11")
|
||||
endif()
|
||||
|
||||
## WinRT D3D Renderer
|
||||
if(WINDOWS_STORE)
|
||||
@ -406,8 +409,12 @@ if(WIN32)
|
||||
target_compile_definitions(angle_renderer_d3d INTERFACE
|
||||
-DANGLE_ENABLE_D3D11
|
||||
"-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }"
|
||||
-DANGLE_ENABLE_D3D11_COMPOSITOR_NATIVE_WINDOW
|
||||
)
|
||||
)
|
||||
if(NOT MINGW)
|
||||
target_compile_definitions(angle_renderer_d3d INTERFACE
|
||||
-DANGLE_ENABLE_D3D11_COMPOSITOR_NATIVE_WINDOW
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(angle_renderer_d3d INTERFACE d3d11 dxguid)
|
||||
add_library(angle::renderer::d3d ALIAS angle_renderer_d3d)
|
||||
endif()
|
||||
@ -679,9 +686,9 @@ if(NOT BUILD_SHARED_LIBS)
|
||||
add_definitions("-DANGLE_EXPORT=" "-DANGLE_UTIL_EXPORT=" "-DEGLAPI=" "-DGL_APICALL=" "-DGL_API=")
|
||||
endif()
|
||||
|
||||
SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES(libGLESv2 PROPERTIES PREFIX "")
|
||||
SET_TARGET_PROPERTIES(libEGL PROPERTIES PREFIX "")
|
||||
set_target_properties(libANGLE PROPERTIES PREFIX "")
|
||||
set_target_properties(libGLESv2 PROPERTIES PREFIX "" IMPORT_PREFIX "")
|
||||
set_target_properties(libEGL PROPERTIES PREFIX "" IMPORT_PREFIX "")
|
||||
|
||||
install(TARGETS libEGL libGLESv2 libANGLE angle_common angle_compression_utils angle_image_util angle_gpu_info_util angle_translator angle_preprocessor GL_VISIBILITY EXPORT ANGLEExport
|
||||
RUNTIME DESTINATION bin
|
||||
|
@ -24,6 +24,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
001-fix-uwp.patch
|
||||
002-fix-builder-error.patch
|
||||
003-fix-mingw.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "angle",
|
||||
"version-string": "chromium_4472",
|
||||
"port-version": 1,
|
||||
"description": [
|
||||
"A conformant OpenGL ES implementation for Windows, Mac and Linux.",
|
||||
"The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support."
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d59efcadc61eb7a7be987e4dcc03540490af89b8",
|
||||
"version-string": "chromium_4472",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "5bd610babb6f0fb15119aa94644494c0dc2bcd2c",
|
||||
"version-string": "chromium_4472",
|
||||
|
@ -82,7 +82,7 @@
|
||||
},
|
||||
"angle": {
|
||||
"baseline": "chromium_4472",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"antlr4": {
|
||||
"baseline": "4.9.1",
|
||||
|
Loading…
Reference in New Issue
Block a user