mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 08:39:01 +08:00
[ms-angle] Set ms-angle to empty package (#11458)
* [ms-angle] Remove invalid port * [ms-angle] Remove invalid port * [ms-angle] Add build depends angle
This commit is contained in:
parent
4050a5b279
commit
efe434b688
@ -1,56 +0,0 @@
|
||||
diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
index 7c769e147..08e7a663f 100644
|
||||
--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
+++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
|
||||
@@ -209,12 +209,12 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr<ABI::Windows::UI::Core::ICoreWind
|
||||
|
||||
static float GetLogicalDpi()
|
||||
{
|
||||
- ComPtr<ABI::Windows::Graphics::Display::IDisplayPropertiesStatics> displayProperties;
|
||||
+ ComPtr<ABI::Windows::Graphics::Display::IDisplayInformation> displayInformation;
|
||||
|
||||
- if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), displayProperties.GetAddressOf())))
|
||||
+ if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), displayInformation.GetAddressOf())))
|
||||
{
|
||||
float dpi = 96.0f;
|
||||
- if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi)))
|
||||
+ if (SUCCEEDED(displayInformation->get_LogicalDpi(&dpi)))
|
||||
{
|
||||
return dpi;
|
||||
}
|
||||
diff --git a/src/common/mathutil.h b/src/common/mathutil.h
|
||||
index dcb7d8d62..774b80506 100644
|
||||
--- a/src/common/mathutil.h
|
||||
+++ b/src/common/mathutil.h
|
||||
@@ -150,7 +150,7 @@ inline bool supportsSSE2()
|
||||
return supports;
|
||||
}
|
||||
|
||||
-#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM)
|
||||
+#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) && !defined(_M_ARM64)
|
||||
{
|
||||
int info[4];
|
||||
__cpuid(info, 0);
|
||||
@@ -884,7 +884,7 @@ inline uint32_t BitfieldReverse(uint32_t value)
|
||||
|
||||
// Count the 1 bits.
|
||||
#if defined(ANGLE_PLATFORM_WINDOWS)
|
||||
-#if defined(_M_ARM)
|
||||
+#if defined(_M_ARM) || defined(_M_ARM64)
|
||||
inline int BitCount(uint32_t bits)
|
||||
{
|
||||
bits = bits - ((bits >> 1) & 0x55555555);
|
||||
diff --git a/src/common/platform.h b/src/common/platform.h
|
||||
index 8287f5b2e..6de52b500 100644
|
||||
--- a/src/common/platform.h
|
||||
+++ b/src/common/platform.h
|
||||
@@ -84,7 +84,7 @@
|
||||
# undef far
|
||||
#endif
|
||||
|
||||
-#if defined(_MSC_VER) && !defined(_M_ARM)
|
||||
+#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64)
|
||||
#include <intrin.h>
|
||||
#define ANGLE_USE_SSE
|
||||
#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
|
||||
|
@ -1,221 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(angle CXX)
|
||||
|
||||
if(WIN32 AND NOT WINDOWS_STORE)
|
||||
set(WINDOWS_DESKTOP 1)
|
||||
else()
|
||||
set(WINDOWS_DESKTOP 0)
|
||||
endif()
|
||||
|
||||
add_compile_options(/d2guard4 /Wv:18)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf")
|
||||
|
||||
add_definitions(
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_SCL_SECURE_NO_WARNINGS
|
||||
-D_HAS_EXCEPTIONS=0
|
||||
-DNOMINMAX
|
||||
-DANGLE_STANDALONE_BUILD
|
||||
-DANGLE_ENABLE_DEBUG_ANNOTATIONS
|
||||
)
|
||||
|
||||
configure_file(src/commit.h include/id/commit.h COPYONLY)
|
||||
include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||
|
||||
##########
|
||||
# angle::common
|
||||
file(GLOB ANGLE_COMMON_SOURCES
|
||||
"src/common/*.h"
|
||||
"src/common/*.inl"
|
||||
"src/common/*.cpp"
|
||||
"src/common/third_party/base/*.h"
|
||||
"src/common/third_party/base/anglebase/*.cc"
|
||||
"src/common/third_party/base/anglebase/*.h"
|
||||
"src/common/third_party/smhasher/src/*.h"
|
||||
"src/common/third_party/smhasher/src/*.cpp")
|
||||
list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac")
|
||||
add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES})
|
||||
target_include_directories(angle_common PUBLIC src/common/third_party/base)
|
||||
add_library(angle::common ALIAS angle_common)
|
||||
|
||||
##########
|
||||
# angle::image_util
|
||||
file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp")
|
||||
add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES})
|
||||
target_link_libraries(angle_image_util PRIVATE angle::common)
|
||||
add_library(angle::image_util ALIAS angle_image_util)
|
||||
|
||||
##########
|
||||
# angle::translator
|
||||
file(GLOB TRANSLATOR_SOURCES
|
||||
"src/compiler/translator/glslang.l"
|
||||
"src/compiler/translator/glslang.y"
|
||||
"src/compiler/translator/*.h"
|
||||
"src/compiler/translator/*.cpp"
|
||||
"src/third_party/compiler/ArrayBoundsClamper.cpp"
|
||||
)
|
||||
add_library(angle_translator STATIC ${TRANSLATOR_SOURCES})
|
||||
target_compile_definitions(angle_translator PUBLIC
|
||||
-DANGLE_ENABLE_ESSL
|
||||
-DANGLE_ENABLE_GLSL
|
||||
-DANGLE_ENABLE_HLSL
|
||||
)
|
||||
target_link_libraries(angle_translator PRIVATE angle::common)
|
||||
add_library(angle::translator ALIAS angle_translator)
|
||||
|
||||
##########
|
||||
# angle::preprocessor
|
||||
file(GLOB PREPROCESSOR_SOURCES
|
||||
"src/compiler/preprocessor/*.h"
|
||||
"src/compiler/preprocessor/*.cpp"
|
||||
)
|
||||
add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES})
|
||||
target_link_libraries(angle_preprocessor PRIVATE angle::common)
|
||||
add_library(angle::preprocessor ALIAS angle_preprocessor)
|
||||
|
||||
##########
|
||||
# libANGLE
|
||||
|
||||
## OpenGL Renderer
|
||||
if(WINDOWS_DESKTOP)
|
||||
file(GLOB LIBANGLE_GL_SOURCES
|
||||
"src/libANGLE/renderer/gl/*.cpp"
|
||||
"src/libANGLE/renderer/gl/*.inl"
|
||||
"src/libANGLE/renderer/gl/*.h"
|
||||
|
||||
"src/libANGLE/renderer/gl/wgl/*.cpp"
|
||||
"src/libANGLE/renderer/gl/wgl/*.inl"
|
||||
"src/libANGLE/renderer/gl/wgl/*.h"
|
||||
)
|
||||
list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest")
|
||||
add_library(angle_renderer_opengl INTERFACE)
|
||||
target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES})
|
||||
target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL)
|
||||
add_library(angle::renderer::opengl ALIAS angle_renderer_opengl)
|
||||
endif()
|
||||
|
||||
## All D3D Sources
|
||||
file(GLOB_RECURSE LIBANGLE_D3D_SOURCES
|
||||
"src/libANGLE/renderer/d3d/*.cpp"
|
||||
"src/libANGLE/renderer/d3d/*.inl"
|
||||
"src/libANGLE/renderer/d3d/*.h"
|
||||
)
|
||||
list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest")
|
||||
|
||||
## WinRT D3D Renderer
|
||||
if(WINDOWS_STORE)
|
||||
set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES})
|
||||
list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt")
|
||||
add_library(angle_renderer_winrt INTERFACE)
|
||||
target_sources(angle_renderer_winrt INTERFACE ${LIBANGLE_D3D_WINRT_SOURCES})
|
||||
add_library(angle::renderer::winrt ALIAS angle_renderer_winrt)
|
||||
endif()
|
||||
|
||||
## Win32/d3d9 D3D Renderer
|
||||
if(WINDOWS_DESKTOP)
|
||||
set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES})
|
||||
list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32")
|
||||
find_library(D3D9_LIB NAMES d3d9)
|
||||
add_library(angle_renderer_win32 INTERFACE)
|
||||
target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES})
|
||||
target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9)
|
||||
target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB})
|
||||
add_library(angle::renderer::win32 ALIAS angle_renderer_win32)
|
||||
endif()
|
||||
|
||||
## D3D11 Base renderer
|
||||
list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32")
|
||||
find_library(DXGUID_LIB NAMES dxguid)
|
||||
find_library(D3D11_LIB NAMES d3d11)
|
||||
add_library(angle_renderer_d3d INTERFACE)
|
||||
target_sources(angle_renderer_d3d INTERFACE ${LIBANGLE_D3D_SOURCES})
|
||||
target_compile_definitions(angle_renderer_d3d INTERFACE
|
||||
-DANGLE_ENABLE_D3D11
|
||||
"-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }"
|
||||
)
|
||||
target_link_libraries(angle_renderer_d3d INTERFACE ${D3D11_LIB} ${DXGUID_LIB})
|
||||
add_library(angle::renderer::d3d ALIAS angle_renderer_d3d)
|
||||
|
||||
## Core libANGLE library
|
||||
file(GLOB LIBANGLE_SOURCES
|
||||
"src/third_party/systeminfo/SystemInfo.cpp"
|
||||
"src/common/third_party/murmurhash/MurmurHash3.cpp"
|
||||
"src/common/event_tracer.cpp"
|
||||
|
||||
"src/libANGLE/*.cpp"
|
||||
"src/libANGLE/*.inl"
|
||||
"src/libANGLE/*.h"
|
||||
|
||||
"src/libANGLE/renderer/*.cpp"
|
||||
"src/libANGLE/renderer/*.inl"
|
||||
"src/libANGLE/renderer/*.h"
|
||||
|
||||
"src/libANGLE/renderer/null/*.cpp"
|
||||
"src/libANGLE/renderer/null/*.inl"
|
||||
"src/libANGLE/renderer/null/*.h"
|
||||
)
|
||||
list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest")
|
||||
|
||||
add_library(libANGLE STATIC ${LIBANGLE_SOURCES})
|
||||
target_link_libraries(libANGLE PRIVATE
|
||||
angle::common
|
||||
angle::image_util
|
||||
angle::translator
|
||||
angle::preprocessor
|
||||
angle::renderer::d3d
|
||||
$<$<BOOL:${WINDOWS_STORE}>:angle::renderer::winrt>
|
||||
$<$<BOOL:${WINDOWS_DESKTOP}>:angle::renderer::win32>
|
||||
$<$<BOOL:${WINDOWS_DESKTOP}>:angle::renderer::opengl>
|
||||
$<$<BOOL:${WINDOWS_DESKTOP}>:gdi32>
|
||||
)
|
||||
target_include_directories(libANGLE PRIVATE "src/third_party/khronos")
|
||||
target_compile_definitions(libANGLE
|
||||
PRIVATE -DANGLE_ENABLE_NULL
|
||||
PUBLIC -DLIBANGLE_IMPLEMENTATION
|
||||
)
|
||||
add_library(angle::libANGLE ALIAS libANGLE)
|
||||
|
||||
##########
|
||||
# libGLESv2
|
||||
file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def")
|
||||
add_library(libGLESv2 ${LIBGLESV2_SOURCES})
|
||||
target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE)
|
||||
target_compile_definitions(libGLESv2
|
||||
PRIVATE -DLIBGLESV2_IMPLEMENTATION
|
||||
PUBLIC
|
||||
-DGL_GLEXT_PROTOTYPES
|
||||
-DGL_APICALL=
|
||||
-DEGLAPI=
|
||||
)
|
||||
target_include_directories(libGLESv2 PUBLIC "$<INSTALL_INTERFACE:include>")
|
||||
|
||||
##########
|
||||
# libEGL
|
||||
add_library(libEGL
|
||||
"src/libEGL/libEGL.def"
|
||||
"src/libEGL/libEGL.cpp"
|
||||
"src/libEGL/libEGL.rc"
|
||||
"src/libEGL/resource.h"
|
||||
)
|
||||
target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2)
|
||||
target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>")
|
||||
|
||||
install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(EXPORT ANGLEExport FILE ms-angle-config.cmake NAMESPACE ms-angle:: DESTINATION share/ms-angle)
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(
|
||||
DIRECTORY include/
|
||||
DESTINATION include
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
PATTERN "GLSLANG" EXCLUDE
|
||||
PATTERN "export.h" EXCLUDE
|
||||
)
|
||||
endif()
|
@ -1,5 +1,4 @@
|
||||
Source: ms-angle
|
||||
Version: 2018-04-18-2
|
||||
Description: The UWP version of 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.
|
||||
Supports: windows|uwp
|
||||
Version: alias
|
||||
Description: Deprecated alias for ms-angle
|
||||
Build-Depends: angle
|
@ -1,31 +1 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
message(FATAL_ERROR "This portfile does not support Linux or OSX")
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO microsoft/angle
|
||||
REF ms-master
|
||||
SHA512 eecdb7012c0630b24fde540fb6a558f4ee5326fc1218773b779953d0fe0ef02da68ceb2577822cfc0374392a88b871201bfe291e3b85c3dd005edc83f84fec1f
|
||||
PATCHES
|
||||
PATCHES
|
||||
001-fix-uwp.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ms-angle RENAME copyright)
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
@ -1155,15 +1155,6 @@ mpir:arm-uwp=skip
|
||||
mpir:x64-uwp=skip
|
||||
mpir:x64-osx=skip
|
||||
mpir:x64-linux=skip
|
||||
#Conflicts with angle and qt-5base
|
||||
ms-angle:arm64-windows = skip
|
||||
ms-angle:arm-uwp = skip
|
||||
ms-angle:x64-linux = skip
|
||||
ms-angle:x64-osx = skip
|
||||
ms-angle:x64-uwp = skip
|
||||
ms-angle:x64-windows = skip
|
||||
ms-angle:x64-windows-static = skip
|
||||
ms-angle:x86-windows = skip
|
||||
msix:x64-linux=fail
|
||||
msix:x64-osx=fail
|
||||
msix:x64-windows-static=fail
|
||||
|
Loading…
Reference in New Issue
Block a user