[opengl] install pkgconfig files for windows (#23536)

* [opengl] install pkgconfig files for windows

* update version field
This commit is contained in:
maz-1 2022-03-16 02:33:47 +08:00 committed by GitHub
parent 5a3a2aae79
commit 436c86065f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 4 deletions

10
ports/opengl/glu.pc.in Normal file
View File

@ -0,0 +1,10 @@
prefix=${pcfiledir}/../..
libdir=${prefix}/lib
includedir=${prefix}/include
Name: glu
Description: OpenGL Utility Library
Version: @WINDOWS_SDK_SEMVER@
Requires: opengl
Libs: -L${libdir} -lGlU32
Cflags: -I${includedir}

View File

@ -0,0 +1,9 @@
prefix=${pcfiledir}/../..
libdir=${prefix}/lib
includedir=${prefix}/include
Name: OpenGL
Description: OpenGL library and headers.
Version: @WINDOWS_SDK_SEMVER@
Libs: -L${libdir} -lOpenGL32
Cflags: -I${includedir}

View File

@ -62,6 +62,18 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore
elseif(WINDOWS_SDK MATCHES "8.")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
endif()
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" WINDOWS_SDK_SEMVER "${WINDOWS_SDK}")
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
configure_file("${CMAKE_CURRENT_LIST_DIR}/opengl.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/opengl.pc" @ONLY)
configure_file("${CMAKE_CURRENT_LIST_DIR}/glu.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glu.pc" @ONLY)
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
configure_file("${CMAKE_CURRENT_LIST_DIR}/opengl.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/opengl.pc" @ONLY)
configure_file("${CMAKE_CURRENT_LIST_DIR}/glu.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glu.pc" @ONLY)
endif()
vcpkg_fixup_pkgconfig()
else()
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
endif()

View File

@ -1,6 +1,5 @@
{
"name": "opengl",
"version-string": "0.0",
"port-version": 9,
"version-date": "2022-03-14",
"description": "Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics."
}

View File

@ -5061,8 +5061,8 @@
"port-version": 3
},
"opengl": {
"baseline": "0.0",
"port-version": 9
"baseline": "2022-03-14",
"port-version": 0
},
"opengl-registry": {
"baseline": "2021-11-17",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6778094e7a9e5027545a46af473d27ce28890c53",
"version-date": "2022-03-14",
"port-version": 0
},
{
"git-tree": "9fa8ed2a1fb625613a32ee95d2413dbc921860f7",
"version-string": "0.0",