aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/egl
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/egl
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/egl')
-rw-r--r--vcpkg/ports/egl/egl.pc.in12
-rw-r--r--vcpkg/ports/egl/portfile.cmake11
-rw-r--r--vcpkg/ports/egl/vcpkg-cmake-wrapper.cmake22
-rw-r--r--vcpkg/ports/egl/vcpkg.json14
4 files changed, 59 insertions, 0 deletions
diff --git a/vcpkg/ports/egl/egl.pc.in b/vcpkg/ports/egl/egl.pc.in
new file mode 100644
index 0000000..17c012c
--- /dev/null
+++ b/vcpkg/ports/egl/egl.pc.in
@@ -0,0 +1,12 @@
+prefix=${pcfiledir}/../..
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: EGL
+Description: EGL library and headers.
+Version: @VERSION@
+Requires.private: zlib opengl # angle
+Libs: -L${libdir} -llibEGL
+Libs.private: -llibGLESv2 -llibANGLE -ld3d9 -ldxguid -ldxgi
+Cflags: -I${includedir}
+Cflags.private: -DKHRONOS_STATIC
diff --git a/vcpkg/ports/egl/portfile.cmake b/vcpkg/ports/egl/portfile.cmake
new file mode 100644
index 0000000..fa9fc8f
--- /dev/null
+++ b/vcpkg/ports/egl/portfile.cmake
@@ -0,0 +1,11 @@
+set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+
+configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/egl/vcpkg-cmake-wrapper.cmake" @ONLY)
+
+if(VCPKG_TARGET_IS_WINDOWS)
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/egl.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/egl.pc" @ONLY)
+ if (NOT VCPKG_BUILD_TYPE)
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/egl.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/egl.pc" @ONLY)
+ endif()
+ vcpkg_fixup_pkgconfig()
+endif()
diff --git a/vcpkg/ports/egl/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/egl/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 0000000..aee1e98
--- /dev/null
+++ b/vcpkg/ports/egl/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,22 @@
+# Wrapper for FindEGL.cmake in extra-cmake-modules (port ecm) and its vendored copies
+
+if(UNIX)
+ find_package(OpenGL COMPONENTS EGL)
+ if(OPENGL_egl_LIBRARY)
+ set(EGL_LIBRARY "${OPENGL_egl_LIBRARY}" CACHE STRING "")
+ set(EGL_INCLUDE_DIR "${OPENGL_EGL_INCLUDE_DIRS}" CACHE STRING "")
+ endif()
+elseif(WIN32)
+ find_package(unofficial-angle CONFIG)
+ if(TARGET unofficial::angle::libEGL)
+ set(EGL_LIBRARY unofficial::angle::libEGL)
+ if(NOT TARGET EGL::EGL)
+ add_library(EGL::EGL INTERFACE IMPORTED)
+ set_target_properties(EGL::EGL PROPERTIES
+ INTERFACE_LINK_LIBRARIES unofficial::angle::libEGL
+ )
+ endif()
+ endif()
+endif()
+
+_find_package(${ARGS})
diff --git a/vcpkg/ports/egl/vcpkg.json b/vcpkg/ports/egl/vcpkg.json
new file mode 100644
index 0000000..59d9507
--- /dev/null
+++ b/vcpkg/ports/egl/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "egl",
+ "version-date": "2022-12-04",
+ "description": "EGL is an interface between Khronos rendering APIs (such as OpenGL, OpenGL ES or OpenVG) and the underlying native platform windowing system.",
+ "license": null,
+ "dependencies": [
+ {
+ "$comment": "alternativly this can be supplied by mesa; angle translates to Direct 3D",
+ "name": "angle",
+ "platform": "windows"
+ },
+ "opengl"
+ ]
+}