Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 103 additions & 22 deletions ports/angle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ add_definitions(
)

configure_file(commit.h include/id/commit.h COPYONLY)
include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include)

#include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include)
include_directories("$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")
##########
# angle::common
if(WINDOWS_DESKTOP)
Expand All @@ -71,14 +71,14 @@ file(GLOB ANGLE_COMMON_SOURCES
"src/common/third_party/smhasher/src/*.h"
"src/common/third_party/smhasher/src/*.cpp")
list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}")
add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES})
target_include_directories(angle_common PUBLIC src/common/third_party/base)
add_library(angle_common OBJECT ${ANGLE_COMMON_SOURCES})
target_include_directories(angle_common PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/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})
add_library(angle_image_util OBJECT ${ANGLE_IMAGE_UTIL_SOURCES})
target_link_libraries(angle_image_util PRIVATE angle::common)
add_library(angle::image_util ALIAS angle_image_util)

Expand All @@ -96,7 +96,7 @@ file(GLOB TRANSLATOR_SOURCES
"src/third_party/compiler/ArrayBoundsClamper.cpp"
)
list(FILTER TRANSLATOR_SOURCES EXCLUDE REGEX "_unittest")
add_library(angle_translator STATIC ${TRANSLATOR_SOURCES})
add_library(angle_translator OBJECT ${TRANSLATOR_SOURCES})
target_compile_definitions(angle_translator PUBLIC
-DANGLE_ENABLE_ESSL
-DANGLE_ENABLE_GLSL
Expand All @@ -111,7 +111,7 @@ file(GLOB PREPROCESSOR_SOURCES
"src/compiler/preprocessor/*.h"
"src/compiler/preprocessor/*.cpp"
)
add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES})
add_library(angle_preprocessor OBJECT ${PREPROCESSOR_SOURCES})
target_link_libraries(angle_preprocessor PRIVATE angle::common)
add_library(angle::preprocessor ALIAS angle_preprocessor)

Expand Down Expand Up @@ -151,7 +151,7 @@ if(WINDOWS_DESKTOP OR LINUX OR APPLE)
)
list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest")
add_library(angle_renderer_opengl INTERFACE)
target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES})
target_sources(angle_renderer_opengl INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_GL_SOURCES}>")
target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL)
add_library(angle::renderer::opengl ALIAS angle_renderer_opengl)
endif()
Expand All @@ -171,7 +171,7 @@ if(WIN32)
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})
target_sources(angle_renderer_winrt INTERFACE "$<BUILD_INTERFACE:${LIBANGLE_D3D_WINRT_SOURCES}>")
add_library(angle::renderer::winrt ALIAS angle_renderer_winrt)
endif()

Expand All @@ -181,7 +181,7 @@ if(WIN32)
list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32|converged")
find_library(D3D9_LIB NAMES d3d9)
add_library(angle_renderer_win32 INTERFACE)
target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES})
target_sources(angle_renderer_win32 INTERFACE "$<BUILD_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)
Expand All @@ -192,7 +192,7 @@ if(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_sources(angle_renderer_d3d INTERFACE "$<BUILD_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\" }"
Expand All @@ -207,7 +207,7 @@ file(GLOB ANGLE_GPU_INFO_UTIL_SOURCES
"src/gpu_info_util/SystemInfo_internal.h"
"src/gpu_info_util/SystemInfo.cpp"
)
add_library(angle_gpu_info_util STATIC ${ANGLE_GPU_INFO_UTIL_SOURCES})
add_library(angle_gpu_info_util OBJECT ${ANGLE_GPU_INFO_UTIL_SOURCES})
if(WIN32)
target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp")
target_link_libraries(angle_gpu_info_util PRIVATE setupapi.lib dxgi.lib)
Expand Down Expand Up @@ -281,6 +281,9 @@ else()
endif()

if(LINUX)
find_package(X11)
include_directories(${X11_INCLUDE_DIR})
list(APPEND LIBANGLE_RENDERER_PLATFORM ${X11_LIBRARIES})
set(LIBANGLE_RENDERER_COMPILEDEF
-DANGLE_USE_X11
)
Expand All @@ -297,14 +300,24 @@ target_link_libraries(libANGLE PRIVATE
angle::preprocessor
${LIBANGLE_RENDERER_PLATFORM}
)
target_include_directories(libANGLE PRIVATE "src/third_party/khronos")
target_include_directories(libANGLE PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/third_party/khronos>")
target_compile_definitions(libANGLE
PRIVATE -DANGLE_ENABLE_NULL
PUBLIC
-DLIBANGLE_IMPLEMENTATION
${LIBANGLE_RENDERER_COMPILEDEF}
${LIBANGLE_RENDERER_COMPILEDEF}
-DANGLE_EXPORT=
-DANGLE_UTIL_EXPORT=
-DEGLAPI=
-DGL_APICALL=
-DGL_API=
)
add_library(angle::libANGLE ALIAS libANGLE)
if(BUILD_SHARED_LIBS)
target_compile_definitions(libANGLE
PRIVATE -DLIBANGLE_UTIL_IMPLEMENTATION
)
endif()

##########
# libGLESv2
Expand Down Expand Up @@ -344,12 +357,28 @@ target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE)
target_compile_definitions(libGLESv2
PRIVATE -DLIBGLESV2_IMPLEMENTATION
PUBLIC
-DGL_GLEXT_PROTOTYPES
-DGL_API=
-DGL_APICALL=
-DEGLAPI=
-DGL_API=
"-DGL_GLES_PROTOTYPES=1"
"-DGL_GLEXT_PROTOTYPES"
"-DEGL_EGL_PROTOTYPES=1"
"-DEGL_EGLEXT_PROTOTYPES"
)
if(BUILD_SHARED_LIBS)
else()
if(WIN32)
target_compile_definitions(libGLESv2 PRIVATE
"-DGL_API="
"-DGL_APICALL="
"-DEGLAPI="
)
else()
target_compile_definitions(libGLESv2 PRIVATE
"-DGL_API=__attribute__((visibility(\"default\")))"
"-DGL_APICALL=__attribute__((visibility(\"default\")))"
"-DEGLAPI=__attribute__((visibility(\"default\")))"
)
endif()
endif()

target_include_directories(libGLESv2 PUBLIC "$<INSTALL_INTERFACE:include>")

##########
Expand All @@ -361,20 +390,72 @@ add_library(libEGL
"src/libEGL/resource.h"
)
target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2)
target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>")
target_include_directories(libEGL PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
target_include_directories(libEGL PUBLIC "$<INSTALL_INTERFACE:include>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
target_compile_definitions(libEGL
PRIVATE -DLIBGLESV2_IMPLEMENTATION
PUBLIC
"-DGL_GLES_PROTOTYPES=1"
"-DGL_GLEXT_PROTOTYPES"
"-DEGL_EGL_PROTOTYPES=1"
"-DEGL_EGLEXT_PROTOTYPES"
)
add_library(GL_VISIBILITY INTERFACE)
if(WIN32)
target_compile_definitions(GL_VISIBILITY INTERFACE
"-DGL_API="
"-DGL_APICALL=")
else()
target_compile_definitions(GL_VISIBILITY INTERFACE
"-DGL_API=__attribute__((visibility(\"default\")))"
"-DGL_APICALL=__attribute__((visibility(\"default\")))")
endif()
target_link_libraries(libEGL PRIVATE GL_VISIBILITY)
target_link_libraries(libGLESv2 PRIVATE GL_VISIBILITY)

if(WIN32)
target_compile_definitions(libEGL PRIVATE
"-DEGLAPI="
)
else()
target_compile_definitions(libEGL PRIVATE
"-DEGLAPI=__attribute__((visibility(\"default\")))"
)
endif()

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 "")

install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport
install(TARGETS libEGL libGLESv2 libANGLE angle_common angle_image_util angle_gpu_info_util angle_translator angle_preprocessor GL_VISIBILITY EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

if(WINDOWS_DESKTOP)
install(TARGETS angle_renderer_d3d angle_renderer_win32 angle_renderer_opengl EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
elseif(WINDOWS_STORE)
install(TARGETS angle_renderer_d3d angle_renderer_winrt EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
else()
install(TARGETS angle_renderer_opengl EXPORT ANGLEExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
endif()

install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle)

if(NOT DISABLE_INSTALL_HEADERS)
Expand Down
4 changes: 2 additions & 2 deletions ports/angle/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: angle
Version: 2019-12-31
Version: 2019-12-31-1
Homepage: https://github.com/google/angle
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.
Build-Depends: egl-registry
Build-Depends: egl-registry, opengl-registry
32 changes: 30 additions & 2 deletions ports/angle/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

if (VCPKG_TARGET_IS_LINUX)
message(WARNING "Building with a gcc version less than 6.1 is not supported.")
endif()
Expand All @@ -21,6 +19,7 @@ vcpkg_from_github(
REPO google/angle
REF 1fdf6ca5141d8e349e875eab6e51d93d929a7f0e
SHA512 2553307f3d10b5c32166b9ed610b4b15310dccba00c644cd35026de86d87ea2e221c2e528f33b02f01c1ded2f08150e429de1fa300b73d655f8944f6f5047a82
# On update check headers against opengl-registry
PATCHES
001-fix-uwp.patch
002-fix-builder-error.patch
Expand All @@ -44,3 +43,32 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/u
vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

# File conflict with opengl-registry! Make sure headers are similar on Update!
# angle defines some additional entrypoints.
# opengl-registry probably needs an upstream update to account for those
# Due to that all angle headers get moved to include/angle.
# If you want to use those instead of the onces provided by opengl-registry make sure
# VCPKG_INSTALLED_DIR/include/angle is before VCPKG_INSTALLED_DIR/include
file(GLOB_RECURSE angle_includes "${CURRENT_PACKAGES_DIR}/include")
file(COPY ${angle_includes} DESTINATION "${CURRENT_PACKAGES_DIR}/include/angle")

set(_double_files
include/GLES/egl.h
include/GLES/gl.h
include/GLES/glext.h
include/GLES/glplatform.h
include/GLES2/gl2.h
include/GLES2/gl2ext.h
include/GLES2/gl2platform.h
include/GLES3/gl3.h
include/GLES3/gl31.h
include/GLES3/gl32.h
include/GLES3/gl3platform.h)
foreach(_file ${_double_files})
if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}")
endif()
endforeach()


2 changes: 1 addition & 1 deletion ports/egl-registry/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: egl-registry
Version: 2019-08-08
Version: 2020-02-03
Description: the EGL API and Extension Registry
4 changes: 2 additions & 2 deletions ports/egl-registry/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/EGL-Registry
REF 598f20e3b7b7eec3e8d8a83e64b9592a21c55bb6
SHA512 360aa2399fec12ad23c5e4bce7e9287a9b1b1d98ba6c326dde2b1bc1c32735bc6933ca8e5c626ba421cda5aac216bc7c268e064cf0dd67605a23151e29ba1f36
REF aa9b63f3ab18aee92c95786a2478156430f809e4
SHA512 5ee7143c2cb46defbe1b2ecb0fabfb52fac2d9529b98c638dd4c04a312a62e7f7b3aee27d9749c92174ab967d533136b5881ce37ae9f2bee6685f52ffa8c8db6
HEAD_REF master
)

Expand Down
2 changes: 1 addition & 1 deletion ports/glad/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: glad
Version: 0.1.33
Version: 0.1.33-1
Description: Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
Build-Depends: egl-registry, opengl-registry
Homepage: https://github.com/Dav1dde/glad
13 changes: 13 additions & 0 deletions ports/glad/encoding.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/glad/__main__.py b/glad/__main__.py
index e7c0544a5..1e10dcc60 100644
--- a/glad/__main__.py
+++ b/glad/__main__.py
@@ -32,7 +32,7 @@ def main():
if reproducible:
logger.info('reproducible build, using packaged specification: \'%s.xml\'', value)
try:
- return spec_cls.from_file(glad.files.open_local(value + '.xml'))
+ return spec_cls.from_file(glad.files.open_local(value + '.xml', encoding='utf-8-sig'))
except IOError:
raise ValueError('unable to open reproducible copy of {}.xml, '
'try dropping --reproducible'.format(value))
1 change: 1 addition & 0 deletions ports/glad/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vcpkg_from_github(
REF de6c39e3040c987323b8ed078c36442f4fb681b3
SHA512 a24523186d59de5c0895791c639c62573eaacf1d3843d3bf81eba848b4a33a9a8d17f9b6f791202dac77692bf147e25b3650989731d5ddb7a22e7d023b66885e
HEAD_REF master
PATCHES encoding.patch
)

vcpkg_find_acquire_program(PYTHON3)
Expand Down
2 changes: 1 addition & 1 deletion ports/opengl-registry/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: opengl-registry
Version: 2019-08-22
Version: 2020-02-03
Build-Depends: egl-registry
Description: the API and Extension registries for the OpenGL family APIs
11 changes: 7 additions & 4 deletions ports/opengl-registry/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/OpenGL-Registry
REF 3c9ab309994c2baeb5572aa0befd5f405166a275
SHA512 f53018fe6dfb926dd6c1ce64ffde19b650a9071a1f6fa0c7a1596237e4ff84c3ff0092fb80811c4fea9b533c4b8607ed51f328d683d8f4aac18f0616f58b56a4
REF 2223f5bebde4aa6b170fb32cdaaf580703fddb67
SHA512 4e9b570f242942bd45a6601a6b0fcf1dc265c6ba03acaf782a639e7399842dd7350c2d4876236df80a070b2bd9ce7cee88cf2d85f2c50cfba7878d1f9379bbe9
HEAD_REF master
)

file(COPY ${SOURCE_PATH}/api/GL DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${SOURCE_PATH}/api/GLES DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${SOURCE_PATH}/api/GLES2 DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${SOURCE_PATH}/api/GLES3 DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${SOURCE_PATH}/api/GLSC DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY ${SOURCE_PATH}/api/GLSC2 DESTINATION ${CURRENT_PACKAGES_DIR}/include)
file(COPY
${SOURCE_PATH}/xml/gl.xml
${SOURCE_PATH}/xml/glx.xml
Expand Down
12 changes: 2 additions & 10 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ ampl-mp:arm-uwp=fail
ampl-mp:x64-uwp=fail
angelscript:arm64-windows=fail
angelscript:arm-uwp=fail

# Conflicts with qt5-base and ms-angle
angle:arm64-windows = skip
angle:arm-uwp = skip
angle:x64-uwp = skip
angle:x64-windows = skip
angle:x64-windows-static = skip
angle:x86-windows = skip
antlr4:arm64-windows=fail
antlr4:arm-uwp=fail
antlr4:x64-uwp=fail
Expand Down Expand Up @@ -1121,8 +1113,8 @@ mpir:x64-uwp=fail
#Conflicts with angle and qt-5base
ms-angle:arm64-windows = skip
ms-angle:arm-uwp = skip
ms-angle:x64-linux = fail
ms-angle:x64-osx = fail
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
Expand Down