Skip to content

Commit

Permalink
[gl3w] Use khrplatform.h from the egl-registry port (#22056)
Browse files Browse the repository at this point in the history
* [gl3w] use khrplatform.h from the egl-registry port

The file was changed yesterday, invalidating the hash: KhronosGroup/EGL-Registry@57b4876.

* [gl3w] migrate to new functions from vcpkg-cmake{,-config}

* [gl3w] bump port version
  • Loading branch information
cfillion authored Dec 17, 2021
1 parent 36e3205 commit 42ef1e9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
16 changes: 4 additions & 12 deletions ports/gl3w/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@ vcpkg_from_github(
0001-enable-shared-build.patch
)

# Download khrplatform.h with vcpkg instead of gl3w_gen.py so that our downloader settings are used
vcpkg_download_distfile(KHRPLATFORM_H
URLS "https://www.khronos.org/registry/EGL/api/KHR/khrplatform.h"
FILENAME khrplatform.h
SHA512 93d9075718eddb69c44482acdc72bbbd3511741272a6124d05ab1ef0702ef03e918501403b6fd334faf2c61f3332f34b7730158aa090db3d448c32b5dd9d9e67
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CURRENT_INSTALLED_DIR}/include/GL/glcorearb.h" DESTINATION "${SOURCE_PATH}/include/GL")
file(COPY "${KHRPLATFORM_H}" DESTINATION "${SOURCE_PATH}/include/KHR")
file(COPY "${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h" DESTINATION "${SOURCE_PATH}/include/KHR")

vcpkg_find_acquire_program(PYTHON3)

Expand All @@ -27,15 +20,14 @@ vcpkg_execute_required_process(
LOGNAME gl3w-gen
)

vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
vcpkg_cmake_config_fixup()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/GL/gl3w.h" "#define GL3W_API" "#define GL3W_API __declspec(dllimport)")
Expand Down
13 changes: 11 additions & 2 deletions ports/gl3w/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{
"name": "gl3w",
"version-date": "2018-05-31",
"port-version": 3,
"port-version": 4,
"description": "Simple OpenGL core profile loading",
"homepage": "https://github.com/skaslev/gl3w",
"dependencies": [
"opengl-registry"
"egl-registry",
"opengl-registry",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,7 @@
},
"gl3w": {
"baseline": "2018-05-31",
"port-version": 3
"port-version": 4
},
"glad": {
"baseline": "0.1.34",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gl3w.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "618626b6f1118dc2c80fa7bd2aae497c0d83b7c1",
"version-date": "2018-05-31",
"port-version": 4
},
{
"git-tree": "bbd82479631534cfe954646d63d29734c3b7728f",
"version-date": "2018-05-31",
Expand Down

0 comments on commit 42ef1e9

Please sign in to comment.