mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:13:07 +08:00
Download khrplatform.h with vcpkg instead of gl3w_gen.py so that our downloader settings are used (#18858)
Alternative resolution of https://github.com/microsoft/vcpkg/pull/18846/
This commit is contained in:
parent
335a3c73c8
commit
b761301f77
@ -1,5 +0,0 @@
|
|||||||
Source: gl3w
|
|
||||||
Version: 2018-05-31-2
|
|
||||||
Homepage: https://github.com/skaslev/gl3w
|
|
||||||
Description: Simple OpenGL core profile loading
|
|
||||||
Build-Depends: opengl-registry
|
|
@ -8,19 +8,27 @@ vcpkg_from_github(
|
|||||||
0001-enable-shared-build.patch
|
0001-enable-shared-build.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
# Download khrplatform.h with vcpkg instead of gl3w_gen.py so that our downloader settings are used
|
||||||
file(COPY ${CURRENT_INSTALLED_DIR}/include/GL/glcorearb.h DESTINATION ${SOURCE_PATH}/include/GL)
|
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")
|
||||||
|
|
||||||
vcpkg_find_acquire_program(PYTHON3)
|
vcpkg_find_acquire_program(PYTHON3)
|
||||||
|
|
||||||
vcpkg_execute_required_process(
|
vcpkg_execute_required_process(
|
||||||
COMMAND ${PYTHON3} ${SOURCE_PATH}/gl3w_gen.py
|
COMMAND "${PYTHON3}" "${SOURCE_PATH}/gl3w_gen.py"
|
||||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
WORKING_DIRECTORY "${SOURCE_PATH}"
|
||||||
LOGNAME gl3w-gen
|
LOGNAME gl3w-gen
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
||||||
)
|
)
|
||||||
@ -30,10 +38,7 @@ vcpkg_copy_pdbs()
|
|||||||
vcpkg_fixup_cmake_targets()
|
vcpkg_fixup_cmake_targets()
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||||
set(HEADER ${CURRENT_PACKAGES_DIR}/include/GL/gl3w.h)
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/GL/gl3w.h" "#define GL3W_API" "#define GL3W_API __declspec(dllimport)")
|
||||||
file(READ ${HEADER} _contents)
|
|
||||||
string(REPLACE "#define GL3W_API" "#define GL3W_API __declspec(dllimport)" _contents "${_contents}")
|
|
||||||
file(WRITE ${HEADER} "${_contents}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(INSTALL ${SOURCE_PATH}/UNLICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl3w RENAME copyright)
|
file(INSTALL "${SOURCE_PATH}/UNLICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||||
|
10
ports/gl3w/vcpkg.json
Normal file
10
ports/gl3w/vcpkg.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "gl3w",
|
||||||
|
"version-date": "2018-05-31",
|
||||||
|
"port-version": 3,
|
||||||
|
"description": "Simple OpenGL core profile loading",
|
||||||
|
"homepage": "https://github.com/skaslev/gl3w",
|
||||||
|
"dependencies": [
|
||||||
|
"opengl-registry"
|
||||||
|
]
|
||||||
|
}
|
@ -2285,8 +2285,8 @@
|
|||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"gl3w": {
|
"gl3w": {
|
||||||
"baseline": "2018-05-31-2",
|
"baseline": "2018-05-31",
|
||||||
"port-version": 0
|
"port-version": 3
|
||||||
},
|
},
|
||||||
"glad": {
|
"glad": {
|
||||||
"baseline": "0.1.34",
|
"baseline": "0.1.34",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "bbd82479631534cfe954646d63d29734c3b7728f",
|
||||||
|
"version-date": "2018-05-31",
|
||||||
|
"port-version": 3
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "7786d613957355b4d238d8fd2278f78fbab5a886",
|
"git-tree": "7786d613957355b4d238d8fd2278f78fbab5a886",
|
||||||
"version-string": "2018-05-31-2",
|
"version-string": "2018-05-31-2",
|
||||||
|
Loading…
Reference in New Issue
Block a user