From bc4031dcfd5b7ed3ffdc9798f6986edce95b3073 Mon Sep 17 00:00:00 2001 From: friendlyanon Date: Mon, 26 Dec 2022 00:59:18 +0100 Subject: [PATCH 1/2] [angle] Propagate transitive dependencies --- ports/angle/CMakeLists.txt | 3 ++- ports/angle/portfile.cmake | 1 + ports/angle/unofficial-angle-config.cmake | 7 +++++++ ports/angle/vcpkg.json | 3 ++- versions/a-/angle.json | 5 +++++ versions/baseline.json | 2 +- 6 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 ports/angle/unofficial-angle-config.cmake diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index febe509510013e..257e1eaee8e4b4 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -742,7 +742,8 @@ else() ) endif() -install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) +install(EXPORT ANGLEExport FILE unofficial-angle-targets.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) +install(FILES unofficial-angle-config.cmake DESTINATION share/unofficial-angle) if(NOT DISABLE_INSTALL_HEADERS) install( diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index df39e019738cc1..885e8b44545fc1 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -28,6 +28,7 @@ vcpkg_from_github( ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-angle-config.cmake" DESTINATION "${SOURCE_PATH}") file(COPY "${CMAKE_CURRENT_LIST_DIR}/angle_commit.h" DESTINATION "${SOURCE_PATH}") file(COPY "${CMAKE_CURRENT_LIST_DIR}/angle_commit.h" DESTINATION "${SOURCE_PATH}/src/common") diff --git a/ports/angle/unofficial-angle-config.cmake b/ports/angle/unofficial-angle-config.cmake new file mode 100644 index 00000000000000..79abf89d7849a0 --- /dev/null +++ b/ports/angle/unofficial-angle-config.cmake @@ -0,0 +1,7 @@ +include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +if(UNIX AND NOT APPLE) + find_dependency(X11 COMPONENTS Xext Xi) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-angle-targets.cmake") diff --git a/ports/angle/vcpkg.json b/ports/angle/vcpkg.json index 144b4956ceb5d1..83ace497b85731 100644 --- a/ports/angle/vcpkg.json +++ b/ports/angle/vcpkg.json @@ -1,12 +1,13 @@ { "name": "angle", "version-string": "chromium_4472", - "port-version": 6, + "port-version": 7, "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." ], "homepage": "https://github.com/google/angle", + "license": "BSD-3-Clause", "dependencies": [ "egl-registry", { diff --git a/versions/a-/angle.json b/versions/a-/angle.json index 5977dc6ce0a23a..a3410e77809fc0 100644 --- a/versions/a-/angle.json +++ b/versions/a-/angle.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "10d893d25d50a449f8aa0592007b973516f325a7", + "version-string": "chromium_4472", + "port-version": 7 + }, { "git-tree": "d48bbcf1eba07a4156e745140be81caff95b8757", "version-string": "chromium_4472", diff --git a/versions/baseline.json b/versions/baseline.json index e8bd6db9b3f7be..5c423adacfabee 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -106,7 +106,7 @@ }, "angle": { "baseline": "chromium_4472", - "port-version": 6 + "port-version": 7 }, "antlr4": { "baseline": "4.11.1", From 03269e4bf11d4027ab4b9b0f8274fe947230652e Mon Sep 17 00:00:00 2001 From: friendlyanon Date: Mon, 26 Dec 2022 23:59:25 +0100 Subject: [PATCH 2/2] [angle] Add usage info for unofficial CMake targets Only the unofficial::angle::libGLESv2 and unofficial::angle::libEGL targets are meant to be used, because they are the targets that no other depends on. --- ports/angle/usage | 8 ++++++++ versions/a-/angle.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 ports/angle/usage diff --git a/ports/angle/usage b/ports/angle/usage new file mode 100644 index 00000000000000..b1fdc146a148c3 --- /dev/null +++ b/ports/angle/usage @@ -0,0 +1,8 @@ +The package angle provides unofficial CMake targets: + + find_package(unofficial-angle REQUIRED CONFIG) + target_link_libraries(main PRIVATE unofficial::angle::libGLESv2) + + # Or use the EGL target + find_package(unofficial-angle REQUIRED CONFIG) + target_link_libraries(main PRIVATE unofficial::angle::libEGL) diff --git a/versions/a-/angle.json b/versions/a-/angle.json index a3410e77809fc0..52c710a2275579 100644 --- a/versions/a-/angle.json +++ b/versions/a-/angle.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "10d893d25d50a449f8aa0592007b973516f325a7", + "git-tree": "96213b303b5b0804d7c8e9b6b94aa3cd3cc90660", "version-string": "chromium_4472", "port-version": 7 },