diff options
| author | Kai Pastor <dg0yt@darc.de> | 2021-08-19 02:21:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-18 17:21:04 -0700 |
| commit | a9613b57751ea9dd7006f251ed1af1ccf3a808f9 (patch) | |
| tree | 821a419a129c7fe389830d7f722eed7ba941516a | |
| parent | 25382e39f7bf93e1d501d9342c6845e7bb0d2574 (diff) | |
| download | vcpkg-a9613b57751ea9dd7006f251ed1af1ccf3a808f9.tar.gz vcpkg-a9613b57751ea9dd7006f251ed1af1ccf3a808f9.zip | |
[angle] Fix mingw build (#19307)
* Fix import lib prefixes
* Fix mingw build
* x-add-version
| -rw-r--r-- | ports/angle/003-fix-mingw.patch | 22 | ||||
| -rw-r--r-- | ports/angle/CMakeLists.txt | 17 | ||||
| -rw-r--r-- | ports/angle/portfile.cmake | 1 | ||||
| -rw-r--r-- | ports/angle/vcpkg.json | 1 | ||||
| -rw-r--r-- | versions/a-/angle.json | 5 | ||||
| -rw-r--r-- | versions/baseline.json | 2 |
6 files changed, 42 insertions, 6 deletions
diff --git a/ports/angle/003-fix-mingw.patch b/ports/angle/003-fix-mingw.patch new file mode 100644 index 000000000..304d822ec --- /dev/null +++ b/ports/angle/003-fix-mingw.patch @@ -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) + { diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index c00c3d0ea..24ab01d86 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -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
diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index 35c38074f..ed604ecb4 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -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}) diff --git a/ports/angle/vcpkg.json b/ports/angle/vcpkg.json index 0987e6c86..3dc8b17df 100644 --- a/ports/angle/vcpkg.json +++ b/ports/angle/vcpkg.json @@ -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." diff --git a/versions/a-/angle.json b/versions/a-/angle.json index bbff894c6..74633bb49 100644 --- a/versions/a-/angle.json +++ b/versions/a-/angle.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "d59efcadc61eb7a7be987e4dcc03540490af89b8", + "version-string": "chromium_4472", + "port-version": 1 + }, + { "git-tree": "5bd610babb6f0fb15119aa94644494c0dc2bcd2c", "version-string": "chromium_4472", "port-version": 0 diff --git a/versions/baseline.json b/versions/baseline.json index 3230e72a9..121613327 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -82,7 +82,7 @@ }, "angle": { "baseline": "chromium_4472", - "port-version": 0 + "port-version": 1 }, "antlr4": { "baseline": "4.9.1", |
