mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 00:17:56 +08:00
[baseline][opengl,mesa] Resolve ambiguities (#28160)
* [mesa] supports: !staticcrt * [mesa] Install copyright from license.rst * [mesa] Revise internal dependencies * [mesa] Revise external dependencies * [mesa] Move windows opengl32 lib to manual-link * [opengl] Fix case of include names * [opengl] Refactor for simplicity and mingw support * [opengl] Stop copying out of windows SDK [skip actions] * Update versions * Revert "[opengl] Stop copying out of windows SDK" * [mesa] Align with port opengl
This commit is contained in:
parent
5387e1925b
commit
ce70fb4f1c
@ -117,24 +117,34 @@ vcpkg_configure_meson(
|
|||||||
vcpkg_install_meson()
|
vcpkg_install_meson()
|
||||||
vcpkg_fixup_pkgconfig()
|
vcpkg_fixup_pkgconfig()
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
file(REMOVE_RECURSE
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||||
|
# installed by egl-registry
|
||||||
|
"${CURRENT_PACKAGES_DIR}/include/KHR"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/include/EGL"
|
||||||
|
# installed by opengl-registry
|
||||||
|
"${CURRENT_PACKAGES_DIR}/include/GL"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/include/GLES"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/include/GLES2"
|
||||||
|
"${CURRENT_PACKAGES_DIR}/include/GLES3"
|
||||||
|
)
|
||||||
|
file(GLOB remaining "${CURRENT_PACKAGES_DIR}/include/*")
|
||||||
|
if(NOT remaining)
|
||||||
|
# All headers to be provided by egl-registry and/or opengl-registry
|
||||||
|
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include")
|
||||||
|
endif()
|
||||||
|
|
||||||
#installed by egl-registry
|
if(VCPKG_TARGET_IS_WINDOWS)
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/KHR")
|
# opengl32.lib is already installed by port opengl.
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/EGL/egl.h")
|
# Mesa claims to provide a drop-in replacement of opengl32.dll.
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/EGL/eglext.h")
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/manual-link")
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/EGL/eglplatform.h")
|
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/opengl32.lib" "${CURRENT_PACKAGES_DIR}/lib/manual-link/opengl32.lib")
|
||||||
#installed by opengl-registry
|
if(NOT VCPKG_BUILD_TYPE)
|
||||||
set(_double_files include/GL/glcorearb.h include/GL/glext.h include/GL/glxext.h
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link")
|
||||||
include/GLES/egl.h include/GLES/gl.h include/GLES/glext.h include/GLES/glplatform.h
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/opengl32.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/opengl32.lib")
|
||||||
include/GLES2/gl2.h include/GLES2/gl2ext.h include/GLES2/gl2platform.h
|
endif()
|
||||||
include/GLES3/gl3.h include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3platform.h)
|
endif()
|
||||||
list(TRANSFORM _double_files PREPEND "${CURRENT_PACKAGES_DIR}/")
|
|
||||||
file(REMOVE ${_double_files})
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/GLES")
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/docs/license.rst")
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/GLES2")
|
|
||||||
# Handle copyright
|
|
||||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
||||||
file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "mesa",
|
"name": "mesa",
|
||||||
"version": "22.1.7",
|
"version": "22.1.7",
|
||||||
|
"port-version": 1,
|
||||||
"description": "Mesa - The 3D Graphics Library",
|
"description": "Mesa - The 3D Graphics Library",
|
||||||
"homepage": "https://www.mesa3d.org/",
|
"homepage": "https://www.mesa3d.org/",
|
||||||
"license": "MIT AND BSL-1.0 AND SGI-B-2.0",
|
"license": "MIT AND BSL-1.0 AND SGI-B-2.0",
|
||||||
"supports": "!(windows & arm)",
|
"supports": "!(windows & arm) & !staticcrt",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "vcpkg-get-python-packages",
|
"name": "vcpkg-get-python-packages",
|
||||||
@ -28,20 +29,8 @@
|
|||||||
"name": "mesa",
|
"name": "mesa",
|
||||||
"default-features": false,
|
"default-features": false,
|
||||||
"features": [
|
"features": [
|
||||||
"gles1"
|
"gles1",
|
||||||
]
|
"gles2",
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mesa",
|
|
||||||
"default-features": false,
|
|
||||||
"features": [
|
|
||||||
"gles2"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "mesa",
|
|
||||||
"default-features": false,
|
|
||||||
"features": [
|
|
||||||
"opengl"
|
"opengl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -58,10 +47,7 @@
|
|||||||
"egl": {
|
"egl": {
|
||||||
"description": "Build support for EGL platform",
|
"description": "Build support for EGL platform",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
"egl-registry"
|
||||||
"name": "mesa",
|
|
||||||
"default-features": false
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gles1": {
|
"gles1": {
|
||||||
@ -69,7 +55,10 @@
|
|||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "mesa",
|
"name": "mesa",
|
||||||
"default-features": false
|
"default-features": false,
|
||||||
|
"features": [
|
||||||
|
"opengl"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -78,7 +67,10 @@
|
|||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "mesa",
|
"name": "mesa",
|
||||||
"default-features": false
|
"default-features": false,
|
||||||
|
"features": [
|
||||||
|
"opengl"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -125,10 +117,7 @@
|
|||||||
"opengl": {
|
"opengl": {
|
||||||
"description": "Build support for OpenGL (all versions)",
|
"description": "Build support for OpenGL (all versions)",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
"opengl"
|
||||||
"name": "mesa",
|
|
||||||
"default-features": false
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@ libdir=${prefix}/lib
|
|||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: glu
|
Name: glu
|
||||||
Description: OpenGL Utility Library
|
Description: Windows OpenGL Utility library
|
||||||
Version: @WINDOWS_SDK_SEMVER@
|
Version: @WINDOWS_SDK_SEMVER@
|
||||||
Requires: opengl
|
Requires: opengl
|
||||||
Libs: -L${libdir} -lGlU32
|
Libs: -L${libdir} -lglu32
|
||||||
Cflags: -I${includedir}
|
Cflags: @WINDOWS_GL_CFLAGS@
|
||||||
|
@ -3,7 +3,7 @@ libdir=${prefix}/lib
|
|||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: OpenGL
|
Name: OpenGL
|
||||||
Description: OpenGL library and headers.
|
Description: Windows OpenGL library
|
||||||
Version: @WINDOWS_SDK_SEMVER@
|
Version: @WINDOWS_SDK_SEMVER@
|
||||||
Libs: -L${libdir} -lOpenGL32
|
Libs: -L${libdir} -lopengl32
|
||||||
Cflags: -I${includedir}
|
Cflags: @WINDOWS_GL_CFLAGS@
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
function(copy_from_windows_sdk WINDOWS_SDK)
|
||||||
vcpkg_get_windows_sdk(WINDOWS_SDK)
|
|
||||||
|
|
||||||
if (WINDOWS_SDK MATCHES "10.")
|
if (WINDOWS_SDK MATCHES "10.")
|
||||||
set(LIBGLFILEPATH "$ENV{WindowsSdkDir}Lib/${WINDOWS_SDK}/um/${TRIPLET_SYSTEM_ARCH}/OpenGL32.Lib")
|
set(LIBGLFILEPATH "$ENV{WindowsSdkDir}Lib/${WINDOWS_SDK}/um/${TRIPLET_SYSTEM_ARCH}/OpenGL32.Lib")
|
||||||
set(LIBGLUFILEPATH "$ENV{WindowsSdkDir}Lib/${WINDOWS_SDK}/um/${TRIPLET_SYSTEM_ARCH}/GlU32.Lib")
|
set(LIBGLUFILEPATH "$ENV{WindowsSdkDir}Lib/${WINDOWS_SDK}/um/${TRIPLET_SYSTEM_ARCH}/GlU32.Lib")
|
||||||
set(HEADERSPATH "$ENV{WindowsSdkDir}Include/${WINDOWS_SDK}/um")
|
set(HEADERSPATH "$ENV{WindowsSdkDir}Include/${WINDOWS_SDK}/um")
|
||||||
|
set(COPYRIGHT "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license.")
|
||||||
elseif(WINDOWS_SDK MATCHES "8.")
|
elseif(WINDOWS_SDK MATCHES "8.")
|
||||||
set(LIBGLFILEPATH "$ENV{WindowsSdkDir}Lib/winv6.3/um/${TRIPLET_SYSTEM_ARCH}/OpenGL32.Lib")
|
set(LIBGLFILEPATH "$ENV{WindowsSdkDir}Lib/winv6.3/um/${TRIPLET_SYSTEM_ARCH}/OpenGL32.Lib")
|
||||||
set(LIBGLUFILEPATH "$ENV{WindowsSdkDir}Lib/winv6.3/um/${TRIPLET_SYSTEM_ARCH}/GlU32.Lib")
|
set(LIBGLUFILEPATH "$ENV{WindowsSdkDir}Lib/winv6.3/um/${TRIPLET_SYSTEM_ARCH}/GlU32.Lib")
|
||||||
set(HEADERSPATH "$ENV{WindowsSdkDir}Include/um")
|
set(HEADERSPATH "$ENV{WindowsSdkDir}Include/um")
|
||||||
|
set(COPYRIGHT "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license.")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
|
message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}")
|
||||||
endif()
|
endif()
|
||||||
@ -23,41 +23,36 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|||||||
message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${DISPLAY}")
|
message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${DISPLAY}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(INCLUDEGLPATH "${CURRENT_PACKAGES_DIR}/include/gl")
|
file(INSTALL "${HEADERSPATH}/GL/gl.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/GL")
|
||||||
set(SHAREOPENGLPATH "${CURRENT_PACKAGES_DIR}/share/opengl")
|
file(INSTALL "${HEADERSPATH}/GL/glu.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/GL")
|
||||||
set(RELEASELIBPATH "${CURRENT_PACKAGES_DIR}/lib")
|
file(INSTALL "${LIBGLFILEPATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
||||||
set(DEBUGLIBPATH "${CURRENT_PACKAGES_DIR}/debug/lib")
|
file(INSTALL "${LIBGLUFILEPATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
||||||
set(GLGLHPATH "${HEADERSPATH}/gl/GL.h")
|
|
||||||
set(GLGLUHPATH "${HEADERSPATH}/gl/GLU.h")
|
|
||||||
|
|
||||||
file(MAKE_DIRECTORY "${INCLUDEGLPATH}" "${SHAREOPENGLPATH}" "${RELEASELIBPATH}")
|
|
||||||
if (NOT VCPKG_BUILD_TYPE)
|
if (NOT VCPKG_BUILD_TYPE)
|
||||||
file(MAKE_DIRECTORY "${DEBUGLIBPATH}")
|
file(INSTALL "${LIBGLFILEPATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
||||||
|
file(INSTALL "${LIBGLUFILEPATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(COPY "${GLGLHPATH}" "${GLGLUHPATH}" DESTINATION "${INCLUDEGLPATH}")
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||||
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "${COPYRIGHT}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
if (NOT VCPKG_BUILD_TYPE)
|
if(VCPKG_TARGET_IS_WINDOWS)
|
||||||
file(COPY "${LIBGLFILEPATH}" DESTINATION "${DEBUGLIBPATH}")
|
if(VCPKG_TARGET_IS_MINGW)
|
||||||
file(COPY "${LIBGLUFILEPATH}" DESTINATION "${DEBUGLIBPATH}")
|
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||||
|
set(WINDOWS_SDK_SEMVER "10.0.0")
|
||||||
|
set(WINDOWS_GL_CFLAGS "")
|
||||||
|
else()
|
||||||
|
vcpkg_get_windows_sdk(WINDOWS_SDK)
|
||||||
|
copy_from_windows_sdk("${WINDOWS_SDK}")
|
||||||
|
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" WINDOWS_SDK_SEMVER "${WINDOWS_SDK}")
|
||||||
|
set(WINDOWS_GL_CFLAGS "-I\${includedir}")
|
||||||
endif()
|
endif()
|
||||||
file(COPY "${LIBGLFILEPATH}" DESTINATION "${RELEASELIBPATH}")
|
|
||||||
file(COPY "${LIBGLUFILEPATH}" DESTINATION "${RELEASELIBPATH}")
|
|
||||||
|
|
||||||
if (WINDOWS_SDK MATCHES "10.")
|
|
||||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license")
|
|
||||||
elseif(WINDOWS_SDK MATCHES "8.")
|
|
||||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/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}")
|
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/opengl.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/opengl.pc" @ONLY)
|
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)
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/glu.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glu.pc" @ONLY)
|
||||||
if (NOT VCPKG_BUILD_TYPE)
|
if(NOT VCPKG_BUILD_TYPE)
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/opengl.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/opengl.pc" @ONLY)
|
file(COPY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/opengl.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
||||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/glu.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glu.pc" @ONLY)
|
file(COPY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glu.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
vcpkg_fixup_pkgconfig()
|
||||||
else()
|
else()
|
||||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "opengl",
|
"name": "opengl",
|
||||||
"version-date": "2022-10-08",
|
"version-date": "2022-12-04",
|
||||||
"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.",
|
"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.",
|
||||||
"license": null,
|
"license": null,
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
@ -571,8 +571,6 @@ mecab:x64-windows = skip
|
|||||||
mecab:x64-windows-static = skip
|
mecab:x64-windows-static = skip
|
||||||
mecab:x64-windows-static-md=skip
|
mecab:x64-windows-static-md=skip
|
||||||
mecab:x86-windows = skip
|
mecab:x86-windows = skip
|
||||||
# Due to static crt.
|
|
||||||
mesa:x64-windows-static=fail
|
|
||||||
# Missing dependent libraries.
|
# Missing dependent libraries.
|
||||||
mesa:x64-linux=fail
|
mesa:x64-linux=fail
|
||||||
mesa:x64-osx=fail
|
mesa:x64-osx=fail
|
||||||
|
@ -4886,7 +4886,7 @@
|
|||||||
},
|
},
|
||||||
"mesa": {
|
"mesa": {
|
||||||
"baseline": "22.1.7",
|
"baseline": "22.1.7",
|
||||||
"port-version": 0
|
"port-version": 1
|
||||||
},
|
},
|
||||||
"meschach": {
|
"meschach": {
|
||||||
"baseline": "1.2b",
|
"baseline": "1.2b",
|
||||||
@ -5573,7 +5573,7 @@
|
|||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"opengl": {
|
"opengl": {
|
||||||
"baseline": "2022-10-08",
|
"baseline": "2022-12-04",
|
||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"opengl-registry": {
|
"opengl-registry": {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "ff0e8b2a943a94c7f1c3d13fbacbddd6d0c2aa3e",
|
||||||
|
"version": "22.1.7",
|
||||||
|
"port-version": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "7febde5a35ffc0cc975e25219121f5dc7048e0ef",
|
"git-tree": "7febde5a35ffc0cc975e25219121f5dc7048e0ef",
|
||||||
"version": "22.1.7",
|
"version": "22.1.7",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "653ce2ed9ecbcce0b51a78f4663031ee78332beb",
|
||||||
|
"version-date": "2022-12-04",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "ea1726ace2d45bcfda85af4b7ef80c579bbbccca",
|
"git-tree": "ea1726ace2d45bcfda85af4b7ef80c579bbbccca",
|
||||||
"version-date": "2022-10-08",
|
"version-date": "2022-10-08",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user