aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2021-08-19 02:21:04 +0200
committerGitHub <noreply@github.com>2021-08-18 17:21:04 -0700
commita9613b57751ea9dd7006f251ed1af1ccf3a808f9 (patch)
tree821a419a129c7fe389830d7f722eed7ba941516a /ports
parent25382e39f7bf93e1d501d9342c6845e7bb0d2574 (diff)
downloadvcpkg-a9613b57751ea9dd7006f251ed1af1ccf3a808f9.tar.gz
vcpkg-a9613b57751ea9dd7006f251ed1af1ccf3a808f9.zip
[angle] Fix mingw build (#19307)
* Fix import lib prefixes * Fix mingw build * x-add-version
Diffstat (limited to 'ports')
-rw-r--r--ports/angle/003-fix-mingw.patch22
-rw-r--r--ports/angle/CMakeLists.txt17
-rw-r--r--ports/angle/portfile.cmake1
-rw-r--r--ports/angle/vcpkg.json1
4 files changed, 36 insertions, 5 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."