[magnum] use supports expressions (#34741)

This commit is contained in:
autoantwort 2023-11-01 21:37:36 +01:00 committed by GitHub
parent 2b609bab7b
commit 6c83d489f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 74 additions and 44 deletions

View File

@ -20,7 +20,7 @@ foreach(_feature IN LISTS ALL_FEATURES)
string(REPLACE "-" "_" _FEATURE "${_FEATURE}")
# Final feature is empty, ignore it
if(_feature)
if(_feature AND NOT "${_feature}" STREQUAL "dynamic-pluginmanager")
list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE})
endif()
endforeach()

View File

@ -1,7 +1,7 @@
{
"name": "corrade",
"version-string": "2020.06",
"port-version": 7,
"port-version": 8,
"description": "C++11/C++14 multiplatform utility library.",
"homepage": "https://magnum.graphics/corrade/",
"dependencies": [
@ -26,11 +26,25 @@
"utility"
],
"features": {
"dynamic-pluginmanager": {
"description": "PluginManager library with dynamic plugin support",
"supports": "!ios & !uwp & !android",
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"pluginmanager"
]
}
]
},
"interconnect": {
"description": "Interconnect library",
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"utility"
]
@ -42,7 +56,12 @@
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
{
"name": "dynamic-pluginmanager",
"platform": "!ios & !uwp & !android"
},
"utility"
]
}
@ -53,6 +72,7 @@
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"utility"
]

View File

@ -14,43 +14,16 @@ vcpkg_from_github(
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_PLUGINS_STATIC)
# Remove platform-specific feature that are not available
# on current target platform from all features.
# For documentation on VCPKG_CMAKE_SYSTEM_NAME see
# https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md#vcpkg_cmake_system_name
set(ALL_SUPPORTED_FEATURES ${ALL_FEATURES})
# Windows Desktop
if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "")
list(REMOVE_ITEM ALL_SUPPORTED_FEATURES wglcontext windowlesswglapplication)
endif()
# Universal Windows Platform
if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
# No UWP specific features
endif()
# Mac OSX
if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
list(REMOVE_ITEM ALL_SUPPORTED_FEATURES cglcontext windowlesscglapplication)
endif()
# Linux
if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
list(REMOVE_ITEM ALL_SUPPORTED_FEATURES glxcontext windowlessglxapplication)
endif()
# WebAssembly / Linux
if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" MATCHES "(Emscripten|Linux)")
list(REMOVE_ITEM ALL_SUPPORTED_FEATURES eglcontext windowlesseglapplication)
endif()
# Head only features
if(NOT VCPKG_USE_HEAD_VERSION)
list(REMOVE_ITEM ALL_SUPPORTED_FEATURES anyshaderconverter shadertools shaderconverter
vk-info)
message(WARNING "Features anyshaderconverter, shadertools, shaderconverter and vk-info are not avaliable when building non-head version.")
foreach(_feature anyshaderconverter shadertools shaderconverter vk-info)
if("${_feature}" IN_LIST FEATURES)
message(FATAL_ERROR "Features anyshaderconverter, shadertools, shaderconverter and vk-info are not avaliable when building non-head version.")
endif()
endforeach()
list(REMOVE_ITEM ALL_SUPPORTED_FEATURES anyshaderconverter shadertools shaderconverter vk-info)
endif()
set(_COMPONENTS "")
@ -97,9 +70,7 @@ set(_TOOLS
imageconverter
sceneconverter)
if(VCPKG_USE_HEAD_VERSION)
list(APPEND _TOOLS
shaderconverter
vk-info)
list(APPEND _TOOLS shaderconverter vk-info)
endif()
foreach(_tool IN LISTS _TOOLS)
if("${_tool}" IN_LIST FEATURES)

View File

@ -1,7 +1,7 @@
{
"name": "magnum",
"version-string": "2020.06",
"port-version": 14,
"port-version": 15,
"description": "C++11/C++14 graphics middleware for games and data visualization",
"homepage": "https://magnum.graphics/",
"license": null,
@ -30,7 +30,6 @@
"anyimageimporter",
"anysceneconverter",
"anysceneimporter",
"anyshaderconverter",
"debugtools",
"gl",
"meshtools",
@ -38,7 +37,6 @@
"scenegraph",
"sdl2application",
"shaders",
"shadertools",
"text",
"texturetools",
"trade"
@ -61,6 +59,7 @@
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"pluginmanager"
]
@ -142,6 +141,7 @@
},
"cglcontext": {
"description": "CglContext library",
"supports": "osx",
"dependencies": [
{
"name": "magnum",
@ -157,6 +157,7 @@
},
"distancefieldconverter": {
"description": "magnum-distancefieldconverter utility",
"supports": "!ios & !android",
"dependencies": [
{
"name": "magnum",
@ -171,6 +172,7 @@
},
"eglcontext": {
"description": "EglContext library",
"supports": "!windows & !osx",
"dependencies": [
{
"name": "magnum",
@ -183,6 +185,7 @@
},
"fontconverter": {
"description": "magnum-fontconverter utility",
"supports": "!ios & !android",
"dependencies": [
{
"name": "magnum",
@ -196,10 +199,12 @@
]
},
"gl": {
"description": "GL library"
"description": "GL library",
"supports": "!uwp"
},
"gl-info": {
"description": "gl-info utility",
"supports": "!ios",
"dependencies": [
{
"name": "magnum",
@ -218,6 +223,7 @@
},
"glxcontext": {
"description": "GlxContext library",
"supports": "!windows & !osx",
"dependencies": [
{
"name": "magnum",
@ -231,6 +237,13 @@
"imageconverter": {
"description": "magnum-imageconverter utility",
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"dynamic-pluginmanager"
]
},
{
"name": "magnum",
"default-features": false,
@ -300,6 +313,7 @@
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"testsuite"
]
@ -320,6 +334,7 @@
"name": "magnum",
"default-features": false,
"features": [
"meshtools",
"trade"
]
}
@ -328,6 +343,13 @@
"sceneconverter": {
"description": "magnum-sceneconverter utility",
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"dynamic-pluginmanager"
]
},
{
"name": "magnum",
"default-features": false,
@ -379,6 +401,7 @@
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"pluginmanager"
]
@ -431,6 +454,7 @@
"dependencies": [
{
"name": "corrade",
"default-features": false,
"features": [
"pluginmanager"
]
@ -469,6 +493,7 @@
},
"wglcontext": {
"description": "WglContext library",
"supports": "windows & !uwp",
"dependencies": [
{
"name": "magnum",
@ -481,6 +506,7 @@
},
"windowlesscglapplication": {
"description": "WindowlessCglApplication library",
"supports": "osx",
"dependencies": [
{
"name": "magnum",
@ -493,6 +519,7 @@
},
"windowlesseglapplication": {
"description": "WindowlessEglApplication library",
"supports": "!windows & !osx & !ios",
"dependencies": [
{
"name": "magnum",
@ -505,6 +532,7 @@
},
"windowlessglxapplication": {
"description": "WindowlessGlxApplication library",
"supports": "!windows & !osx & !ios",
"dependencies": [
{
"name": "magnum",
@ -517,6 +545,7 @@
},
"windowlesswglapplication": {
"description": "WindowlessWglApplication library",
"supports": "windows & !uwp",
"dependencies": [
{
"name": "magnum",

View File

@ -1790,7 +1790,7 @@
},
"corrade": {
"baseline": "2020.06",
"port-version": 7
"port-version": 8
},
"cpp-async": {
"baseline": "1.1.0",
@ -5318,7 +5318,7 @@
},
"magnum": {
"baseline": "2020.06",
"port-version": 14
"port-version": 15
},
"magnum-extras": {
"baseline": "2020.06",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a7c12fdbe3c15ad76eced6d157af6e09d49329e5",
"version-string": "2020.06",
"port-version": 8
},
{
"git-tree": "8630a6d00fec6c7462af2e03bd0e1946f6812069",
"version-string": "2020.06",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b1b8f84dd450902aec2b555eb577dfd2a0129592",
"version-string": "2020.06",
"port-version": 15
},
{
"git-tree": "9153bafdfb1c8f5ef113947611b1c916a3e472c3",
"version-string": "2020.06",