diff options
Diffstat (limited to 'vcpkg/ports/magnum')
| -rw-r--r-- | vcpkg/ports/magnum/002-sdl-includes.patch | 43 | ||||
| -rw-r--r-- | vcpkg/ports/magnum/003-fix-FindGLFW.patch | 16 | ||||
| -rw-r--r-- | vcpkg/ports/magnum/004-fix-FindOpenAL.patch | 25 | ||||
| -rwxr-xr-x | vcpkg/ports/magnum/005-fix-find-sdl2.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/magnum/006-fix-build.patch | 70 | ||||
| -rw-r--r-- | vcpkg/ports/magnum/007-missing-headers.diff | 40 | ||||
| -rw-r--r-- | vcpkg/ports/magnum/magnumdeploy.ps1 | 40 | ||||
| -rw-r--r-- | vcpkg/ports/magnum/portfile.cmake | 169 | ||||
| -rw-r--r-- | vcpkg/ports/magnum/vcpkg.json | 560 |
9 files changed, 976 insertions, 0 deletions
diff --git a/vcpkg/ports/magnum/002-sdl-includes.patch b/vcpkg/ports/magnum/002-sdl-includes.patch new file mode 100644 index 0000000..fb2ffed --- /dev/null +++ b/vcpkg/ports/magnum/002-sdl-includes.patch @@ -0,0 +1,43 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp +index 276c7ee55..90c52f3cb 100644 +--- a/src/Magnum/Platform/Sdl2Application.cpp ++++ b/src/Magnum/Platform/Sdl2Application.cpp +@@ -34,7 +34,7 @@ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif +-#include <SDL.h> ++#include <SDL2/SDL.h> + #ifdef CORRADE_TARGET_CLANG_CL + #pragma clang diagnostic pop + #endif +diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h +index b2426d513..176729fdb 100644 +--- a/src/Magnum/Platform/Sdl2Application.h ++++ b/src/Magnum/Platform/Sdl2Application.h +@@ -57,11 +57,11 @@ + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif + /* SDL.h includes the world, adding 50k LOC. We don't want that either. */ +-#include <SDL_keycode.h> +-#include <SDL_mouse.h> +-#include <SDL_version.h> /* huh, why is this not pulled in implicitly?! */ +-#include <SDL_video.h> +-#include <SDL_scancode.h> ++#include <SDL2/SDL_keycode.h> ++#include <SDL2/SDL_mouse.h> ++#include <SDL2/SDL_version.h> /* huh, why is this not pulled in implicitly?! */ ++#include <SDL2/SDL_video.h> ++#include <SDL2/SDL_scancode.h> + + #ifdef CORRADE_TARGET_IOS + /* Including SDL_main.h unconditionally would mean it'd override Corrade::Main +@@ -74,7 +74,7 @@ + #endif + + #ifdef CORRADE_TARGET_WINDOWS_RT +-#include <SDL_main.h> /* For SDL_WinRTRunApp */ ++#include <SDL2/SDL_main.h> /* For SDL_WinRTRunApp */ + #include <wrl.h> /* For the WinMain entrypoint */ + #endif + #ifdef CORRADE_TARGET_CLANG_CL diff --git a/vcpkg/ports/magnum/003-fix-FindGLFW.patch b/vcpkg/ports/magnum/003-fix-FindGLFW.patch new file mode 100644 index 0000000..a6b9cdf --- /dev/null +++ b/vcpkg/ports/magnum/003-fix-FindGLFW.patch @@ -0,0 +1,16 @@ +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8761448..17321af 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -647,9 +647,9 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + + # GLFW application dependencies + elseif(_component STREQUAL GlfwApplication) +- find_package(GLFW) ++ find_package(glfw3 CONFIG REQUIRED) + set_property(TARGET Magnum::${_component} APPEND PROPERTY +- INTERFACE_LINK_LIBRARIES GLFW::GLFW) ++ INTERFACE_LINK_LIBRARIES glfw) + # Use the Foundation framework on Apple to query the DPI awareness + if(CORRADE_TARGET_APPLE) + find_library(_MAGNUM_APPLE_FOUNDATION_FRAMEWORK_LIBRARY Foundation) diff --git a/vcpkg/ports/magnum/004-fix-FindOpenAL.patch b/vcpkg/ports/magnum/004-fix-FindOpenAL.patch new file mode 100644 index 0000000..f108612 --- /dev/null +++ b/vcpkg/ports/magnum/004-fix-FindOpenAL.patch @@ -0,0 +1,25 @@ +diff --git a/src/MagnumPlugins/AnyAudioImporter/CMakeLists.txt b/src/MagnumPlugins/AnyAudioImporter/CMakeLists.txt +index 64371a4..375ca58 100644 +--- a/src/MagnumPlugins/AnyAudioImporter/CMakeLists.txt ++++ b/src/MagnumPlugins/AnyAudioImporter/CMakeLists.txt +@@ -24,6 +24,7 @@ + # + + find_package(Corrade REQUIRED PluginManager) ++find_package(OpenAL CONFIG REQUIRED) + + if(BUILD_PLUGINS_STATIC) + set(MAGNUM_ANYAUDIOIMPORTER_BUILD_STATIC 1) +diff --git a/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt b/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt +index f4172d4..bdfd9da 100644 +--- a/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt ++++ b/src/MagnumPlugins/WavAudioImporter/CMakeLists.txt +@@ -24,6 +24,8 @@ + # + + find_package(Corrade REQUIRED PluginManager) ++include(CMakeFindDependencyMacro) ++find_dependency(OpenAL) + + if(BUILD_PLUGINS_STATIC) + set(MAGNUM_WAVAUDIOIMPORTER_BUILD_STATIC 1) diff --git a/vcpkg/ports/magnum/005-fix-find-sdl2.patch b/vcpkg/ports/magnum/005-fix-find-sdl2.patch new file mode 100755 index 0000000..83173b6 --- /dev/null +++ b/vcpkg/ports/magnum/005-fix-find-sdl2.patch @@ -0,0 +1,13 @@ +diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt
+index f1b404f..19babf4 100644
+--- a/src/Magnum/Platform/CMakeLists.txt
++++ b/src/Magnum/Platform/CMakeLists.txt
+@@ -292,7 +292,7 @@ endif()
+
+ # SDL2 application
+ if(WITH_SDL2APPLICATION)
+- find_package(SDL2)
++ find_package(SDL2 CONFIG REQUIRED)
+ if(NOT SDL2_FOUND)
+ message(FATAL_ERROR "SDL2 library, required by Sdl2Application, was not found. Set WITH_SDL2APPLICATION to OFF to skip building it.")
+ endif()
diff --git a/vcpkg/ports/magnum/006-fix-build.patch b/vcpkg/ports/magnum/006-fix-build.patch new file mode 100644 index 0000000..002b013 --- /dev/null +++ b/vcpkg/ports/magnum/006-fix-build.patch @@ -0,0 +1,70 @@ +diff --git a/src/Magnum/Vk/Enums.cpp b/src/Magnum/Vk/Enums.cpp +index ad8b6d063..b7dffb74f 100644 +--- a/src/Magnum/Vk/Enums.cpp ++++ b/src/Magnum/Vk/Enums.cpp +@@ -36,17 +36,17 @@ namespace Magnum { namespace Vk { + + namespace { + +-constexpr VkPrimitiveTopology PrimitiveTopologyMapping[]{ ++constexpr UnsignedInt PrimitiveTopologyMapping[]{ + VK_PRIMITIVE_TOPOLOGY_POINT_LIST, + VK_PRIMITIVE_TOPOLOGY_LINE_LIST, +- VkPrimitiveTopology(~UnsignedInt{}), ++ ~UnsignedInt{}, + VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, +- VkPrimitiveTopology(~UnsignedInt{}), /* Instances */ +- VkPrimitiveTopology(~UnsignedInt{}), /* Faces */ +- VkPrimitiveTopology(~UnsignedInt{}) /* Edges */ ++ ~UnsignedInt{}, /* Instances */ ++ ~UnsignedInt{}, /* Faces */ ++ ~UnsignedInt{} /* Edges */ + }; + + constexpr VkIndexType IndexTypeMapping[]{ +@@ -94,12 +94,12 @@ constexpr VkSamplerMipmapMode SamplerMipmapModeMapping[]{ + VK_SAMPLER_MIPMAP_MODE_LINEAR + }; + +-constexpr VkSamplerAddressMode SamplerAddressModeMapping[]{ ++constexpr UnsignedInt SamplerAddressModeMapping[]{ + VK_SAMPLER_ADDRESS_MODE_REPEAT, + VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, +- VkSamplerAddressMode(~UnsignedInt{}), ++ ~UnsignedInt{}, + }; + + } +@@ -119,10 +119,10 @@ VkPrimitiveTopology vkPrimitiveTopology(const Magnum::MeshPrimitive primitive) { + + CORRADE_ASSERT(UnsignedInt(primitive) - 1 < Containers::arraySize(PrimitiveTopologyMapping), + "Vk::vkPrimitiveTopology(): invalid primitive" << primitive, {}); +- const VkPrimitiveTopology out = PrimitiveTopologyMapping[UnsignedInt(primitive) - 1]; +- CORRADE_ASSERT(out != VkPrimitiveTopology(~UnsignedInt{}), ++ const UnsignedInt out = PrimitiveTopologyMapping[UnsignedInt(primitive) - 1]; ++ CORRADE_ASSERT(out != ~UnsignedInt{}, + "Vk::vkPrimitiveTopology(): unsupported primitive" << primitive, {}); +- return out; ++ return VkPrimitiveTopology(out); + } + + bool hasVkIndexType(const Magnum::MeshIndexType type) { +@@ -224,10 +224,10 @@ bool hasVkSamplerAddressMode(const Magnum::SamplerWrapping wrapping) { + VkSamplerAddressMode vkSamplerAddressMode(const Magnum::SamplerWrapping wrapping) { + CORRADE_ASSERT(UnsignedInt(wrapping) < Containers::arraySize(SamplerAddressModeMapping), + "Vk::vkSamplerAddressMode(): invalid wrapping" << wrapping, {}); +- const VkSamplerAddressMode out = SamplerAddressModeMapping[UnsignedInt(wrapping)]; +- CORRADE_ASSERT(out != VkSamplerAddressMode(~UnsignedInt{}), ++ const UnsignedInt out = SamplerAddressModeMapping[UnsignedInt(wrapping)]; ++ CORRADE_ASSERT(out != ~UnsignedInt{}, + "Vk::vkSamplerAddressMode(): unsupported wrapping" << wrapping, {}); +- return out; ++ return VkSamplerAddressMode(out); + } + + }} diff --git a/vcpkg/ports/magnum/007-missing-headers.diff b/vcpkg/ports/magnum/007-missing-headers.diff new file mode 100644 index 0000000..7140d14 --- /dev/null +++ b/vcpkg/ports/magnum/007-missing-headers.diff @@ -0,0 +1,40 @@ +diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h +index 861a496..2d0436b 100644 +--- a/src/Magnum/Math/Vector.h ++++ b/src/Magnum/Math/Vector.h +@@ -29,6 +29,8 @@ + * @brief Class @ref Magnum::Math::Vector, function @ref Magnum::Math::dot(), @ref Magnum::Math::angle() + */ + ++#include <cstddef> ++#include <vector> + #include <utility> + #include <Corrade/Utility/Assert.h> + #ifndef CORRADE_NO_DEBUG +diff --git a/src/Magnum/MeshTools/CompressIndices.h b/src/Magnum/MeshTools/CompressIndices.h +index 7223bd7..aae88c6 100644 +--- a/src/Magnum/MeshTools/CompressIndices.h ++++ b/src/Magnum/MeshTools/CompressIndices.h +@@ -29,6 +29,8 @@ + * @brief Function @ref Magnum::MeshTools::compressIndices() + */ + ++#include <cstddef> ++#include <vector> + #include <utility> + #include <Corrade/Containers/Containers.h> + +diff --git a/src/Magnum/MeshTools/GenerateNormals.h b/src/Magnum/MeshTools/GenerateNormals.h +index 3dbf88b..71eadd0 100644 +--- a/src/Magnum/MeshTools/GenerateNormals.h ++++ b/src/Magnum/MeshTools/GenerateNormals.h +@@ -29,6 +29,9 @@ + * @brief Function @ref Magnum::MeshTools::generateFlatNormals(), @ref Magnum::MeshTools::generateFlatNormalsInto(), @ref Magnum::MeshTools::generateSmoothNormals(), @ref Magnum::MeshTools::generateSmoothNormalsInto() + */ + ++#include <cstddef> ++#include <utility> ++#include <vector> + #include "Magnum/Magnum.h" + #include "Magnum/MeshTools/visibility.h" + diff --git a/vcpkg/ports/magnum/magnumdeploy.ps1 b/vcpkg/ports/magnum/magnumdeploy.ps1 new file mode 100644 index 0000000..c32ed03 --- /dev/null +++ b/vcpkg/ports/magnum/magnumdeploy.ps1 @@ -0,0 +1,40 @@ +# Magnum's plugin deployment strategy is that each Magnum module has a hardcoded
+# set of plugin directories. Each of these directories is deployed in
+# full if that Module is referenced.
+#
+# Note: this function signature and behavior is depended upon by applocal.ps1
+function deployPluginsIfMagnum([string]$targetBinaryDir, [string]$MagnumPluginsDir, [string]$targetBinaryName) {
+ Write-Verbose "Deploying magnum plugins"
+
+ $baseDir = Split-Path $MagnumPluginsDir -parent
+ $pluginsBase = Split-Path $MagnumPluginsDir -Leaf
+ $binDir = "$baseDir\bin"
+
+ function deployPlugins([string]$pluginSubdirName) {
+ if (Test-Path "$MagnumPluginsDir\$pluginSubdirName") {
+ Write-Verbose " Deploying plugins directory '$pluginSubdirName'"
+ New-Item "$targetBinaryDir\$pluginsBase\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
+ Get-ChildItem -Path "$MagnumPluginsDir\$pluginSubdirName\*" -Include "*.dll", "*.conf", "*.pdb" | % {
+ deployBinary "$targetBinaryDir\$pluginsBase\$pluginSubdirName" "$MagnumPluginsDir\$pluginSubdirName" $_.Name
+ resolve $_
+ }
+ } else {
+ Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist"
+ }
+ }
+
+ # We detect Magnum modules in use via the DLLs that contain their
+ # plugin interfaces.
+ if ($targetBinaryName -like "MagnumAudio.dll" -or $targetBinaryName -like "MagnumAudio-d.dll") {
+ deployPlugins "audioimporters"
+ } elseif ($targetBinaryName -like "MagnumText.dll" -or $targetBinaryName -like "MagnumText-d.dll") {
+ deployPlugins "fonts"
+ deployPlugins "fontconverters"
+ } elseif ($targetBinaryName -like "MagnumTrade.dll" -or $targetBinaryName -like "MagnumTrade-d.dll") {
+ deployPlugins "importers"
+ deployPlugins "imageconverters"
+ deployPlugins "sceneconverters"
+ } elseif ($targetBinaryName -like "MagnumShaderTools.dll" -or $targetBinaryName -like "MagnumShaderTools-d.dll") {
+ deployPlugins "shaderconverters"
+ }
+}
diff --git a/vcpkg/ports/magnum/portfile.cmake b/vcpkg/ports/magnum/portfile.cmake new file mode 100644 index 0000000..bd46aa6 --- /dev/null +++ b/vcpkg/ports/magnum/portfile.cmake @@ -0,0 +1,169 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum + REF v2020.06 + SHA512 65b0c8a4520d1d282420c30ecd7c8525525d4dbb6e562e1e2e93d110f4eb686af43f098bf02460727fab1e1f9446dd00a99051e150c05ea40b1486a44fea1042 + HEAD_REF master + PATCHES + 002-sdl-includes.patch + 003-fix-FindGLFW.patch + 004-fix-FindOpenAL.patch + 005-fix-find-sdl2.patch + 006-fix-build.patch # From https://github.com/mosra/magnum/issues/642#issuecomment-2217261862 + 007-missing-headers.diff +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_PLUGINS_STATIC) + +set(ALL_SUPPORTED_FEATURES ${ALL_FEATURES}) + +# Head only features +if(NOT VCPKG_USE_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 "") +# Generate cmake parameters from feature names +foreach(_feature IN LISTS ALL_SUPPORTED_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Final feature is empty, ignore it + if(_feature) + list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE}) + endif() +endforeach() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES ${_COMPONENTS}) + +if(VCPKG_CROSSCOMPILING) + set(CORRADE_RC_EXECUTABLE "-DCORRADE_RC_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/corrade/corrade-rc${VCPKG_HOST_EXECUTABLE_SUFFIX}") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + ${CORRADE_RC_EXECUTABLE} + -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +# Copy tools into vcpkg's tools directory +set(_TOOL_EXEC_NAMES "") +set(_TOOLS + al-info + distancefieldconverter + fontconverter + gl-info + imageconverter + sceneconverter) +if(VCPKG_USE_HEAD_VERSION) + list(APPEND _TOOLS shaderconverter vk-info) +endif() +foreach(_tool IN LISTS _TOOLS) + if("${_tool}" IN_LIST FEATURES) + list(APPEND _TOOL_EXEC_NAMES magnum-${_tool}) + endif() +endforeach() +message(STATUS ${_TOOL_EXEC_NAMES}) +if(_TOOL_EXEC_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${_TOOL_EXEC_NAMES} AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Special handling for plugins. +# +# For static plugins, in order to make MSBuild auto-linking magic work, where +# the linker implicitly takes everything from the root lib/ folder, the +# static libraries have to be moved out of lib/magnum/blah/ directly to lib/. +# Possibly would be enough to do this just for Windows, doing it also on other +# platforms for consistency. +# +# For dynamic plugins, auto-linking is not desirable as those are meant to be +# loaded dynamically at runtime instead. In order to prevent that, on Windows +# the *.lib files corresponding to the plugin *.dlls are removed. However, we +# cannot remove the *.lib files entirely here, as plugins from magnum-plugins +# are linked to them on Windows (e.g. AssimpImporter depends on +# AnyImageImporter). Thus the Any* plugin lib files are kept, but also not +# moved to the root lib/ folder, to prevent autolinking. A consequence of the +# *.lib file removal is that downstream projects can't implement Magnum plugins +# that would depend on (and thus link to) these, but that's considered a very +# rare use case and so it's fine. +# +# See https://github.com/microsoft/vcpkg/pull/1235#issuecomment-308805989 for +# futher info. +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE "${CURRENT_PACKAGES_DIR}/lib/magnum/*") + file(COPY ${LIB_TO_MOVE} DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum") + + file(GLOB_RECURSE LIB_TO_MOVE_DBG "${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*") + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/magnum") +else() + if(VCPKG_TARGET_IS_WINDOWS) + file(GLOB_RECURSE LIB_TO_REMOVE "${CURRENT_PACKAGES_DIR}/lib/magnum/*") + file(GLOB_RECURSE LIB_TO_KEEP "${CURRENT_PACKAGES_DIR}/lib/magnum/*Any*") + if(LIB_TO_KEEP) + list(REMOVE_ITEM LIB_TO_REMOVE ${LIB_TO_KEEP}) + endif() + if(LIB_TO_REMOVE) + file(REMOVE ${LIB_TO_REMOVE}) + endif() + + if (VCPKG_TARGET_IS_UWP) + set(debug_dir "magnum") + else() + set(debug_dir "magnum-d") + endif() + + file(GLOB_RECURSE LIB_TO_REMOVE_DBG "${CURRENT_PACKAGES_DIR}/debug/lib/${debug_dir}/*") + file(GLOB_RECURSE LIB_TO_KEEP_DBG "${CURRENT_PACKAGES_DIR}/debug/lib/${debug_dir}/*Any*") + if(LIB_TO_KEEP_DBG) + list(REMOVE_ITEM LIB_TO_REMOVE_DBG ${LIB_TO_KEEP_DBG}) + endif() + if(LIB_TO_REMOVE_DBG) + file(REMOVE ${LIB_TO_REMOVE_DBG}) + endif() + + # remove maybe empty dirs + foreach(subdir "fonts" "importers" "fontconverters" "imageconverters" "audioimporters") + file(GLOB maybe_empty "${CURRENT_PACKAGES_DIR}/lib/magnum/${subdir}/*") + if(maybe_empty STREQUAL "") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum/${subdir}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/${debug_dir}/${subdir}") + endif() + endforeach() + + file(GLOB maybe_empty "${CURRENT_PACKAGES_DIR}/lib/magnum/*") + if(maybe_empty STREQUAL "") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/magnum") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/${debug_dir}") + endif() + + endif() + + file(COPY "${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1" DESTINATION "${CURRENT_PACKAGES_DIR}/bin/magnum") + file(COPY "${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin/${debug_dir}") +endif() + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/magnum/vcpkg.json b/vcpkg/ports/magnum/vcpkg.json new file mode 100644 index 0000000..8a67495 --- /dev/null +++ b/vcpkg/ports/magnum/vcpkg.json @@ -0,0 +1,560 @@ +{ + "name": "magnum", + "version-string": "2020.06", + "port-version": 20, + "description": "C++11/C++14 graphics middleware for games and data visualization", + "homepage": "https://magnum.graphics/", + "license": null, + "dependencies": [ + { + "name": "corrade", + "host": true, + "features": [ + "utility" + ] + }, + { + "name": "corrade", + "features": [ + "utility" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + "anyaudioimporter", + "anyimageconverter", + "anyimageimporter", + "anysceneconverter", + "anysceneimporter", + "debugtools", + "gl", + "meshtools", + "primitives", + "scenegraph", + "sdl2application", + "shaders", + "text", + "texturetools", + "trade" + ], + "features": { + "al-info": { + "description": "magnum-al-info utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "anyaudioimporter": { + "description": "AnyAudioImporter plugin", + "dependencies": [ + { + "name": "corrade", + "default-features": false, + "features": [ + "pluginmanager" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "anyimageconverter": { + "description": "AnyImageConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "anyimageimporter": { + "description": "AnyImageImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "anysceneconverter": { + "description": "AnySceneConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "anysceneimporter": { + "description": "AnySceneImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "anyshaderconverter": { + "description": "AnyShaderConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "shadertools" + ] + } + ] + }, + "audio": { + "description": "Audio library", + "dependencies": [ + "openal-soft" + ] + }, + "cglcontext": { + "description": "CglContext library", + "supports": "osx", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "debugtools": { + "description": "DebugTools library" + }, + "distancefieldconverter": { + "description": "magnum-distancefieldconverter utility", + "supports": "!ios & !android", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl", + "texturetools", + "trade" + ] + } + ] + }, + "eglcontext": { + "description": "EglContext library", + "supports": "!windows & !osx", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "fontconverter": { + "description": "magnum-fontconverter utility", + "supports": "!ios & !android", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl", + "text", + "trade" + ] + } + ] + }, + "gl": { + "description": "GL library", + "supports": "!uwp" + }, + "gl-info": { + "description": "gl-info utility", + "supports": "!ios", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "glfwapplication": { + "description": "GlfwApplication library", + "dependencies": [ + "glfw3" + ] + }, + "glxcontext": { + "description": "GlxContext library", + "supports": "!windows & !osx", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "imageconverter": { + "description": "magnum-imageconverter utility", + "dependencies": [ + { + "name": "corrade", + "default-features": false, + "features": [ + "dynamic-pluginmanager" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "magnumfont": { + "description": "MagnumFont plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "text" + ] + } + ] + }, + "magnumfontconverter": { + "description": "MagnumFontConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "text" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "tgaimageconverter" + ] + } + ] + }, + "meshtools": { + "description": "MeshTools library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "objimporter": { + "description": "ObjImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "opengltester": { + "description": "OpenGLTester library", + "dependencies": [ + { + "name": "corrade", + "default-features": false, + "features": [ + "testsuite" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "primitives": { + "description": "Primitives library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "meshtools", + "trade" + ] + } + ] + }, + "sceneconverter": { + "description": "magnum-sceneconverter utility", + "dependencies": [ + { + "name": "corrade", + "default-features": false, + "features": [ + "dynamic-pluginmanager" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "anysceneconverter" + ] + } + ] + }, + "scenegraph": { + "description": "SceneGraph library" + }, + "sdl2application": { + "description": "Sdl2Application library", + "dependencies": [ + "sdl2" + ] + }, + "shaderconverter": { + "description": "magnum-shaderconverter utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "anyshaderconverter", + "shadertools" + ] + } + ] + }, + "shaders": { + "description": "Shaders library", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "shadertools": { + "description": "ShaderTools library" + }, + "text": { + "description": "Text library", + "dependencies": [ + { + "name": "corrade", + "default-features": false, + "features": [ + "pluginmanager" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + }, + { + "name": "magnum", + "default-features": false, + "features": [ + "texturetools" + ] + } + ] + }, + "texturetools": { + "description": "TextureTools library" + }, + "tgaimageconverter": { + "description": "TgaImageConverter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "tgaimporter": { + "description": "TgaImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "trade" + ] + } + ] + }, + "trade": { + "description": "Trade library", + "dependencies": [ + { + "name": "corrade", + "default-features": false, + "features": [ + "pluginmanager" + ] + } + ] + }, + "vk": { + "description": "Vk library", + "dependencies": [ + "vulkan" + ] + }, + "vk-info": { + "description": "vk-info utility", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "vk" + ] + } + ] + }, + "wavaudioimporter": { + "description": "WavAudioImporter plugin", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "audio" + ] + } + ] + }, + "wglcontext": { + "description": "WglContext library", + "supports": "windows & !uwp", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "windowlesscglapplication": { + "description": "WindowlessCglApplication library", + "supports": "osx", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "windowlesseglapplication": { + "description": "WindowlessEglApplication library", + "supports": "!windows & !osx & !ios", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "windowlessglxapplication": { + "description": "WindowlessGlxApplication library", + "supports": "!windows & !osx & !ios", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + }, + "windowlesswglapplication": { + "description": "WindowlessWglApplication library", + "supports": "windows & !uwp", + "dependencies": [ + { + "name": "magnum", + "default-features": false, + "features": [ + "gl" + ] + } + ] + } + } +} |