aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/magnum-integration
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/magnum-integration
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/magnum-integration')
-rw-r--r--vcpkg/ports/magnum-integration/portfile.cmake65
-rw-r--r--vcpkg/ports/magnum-integration/vcpkg.json48
2 files changed, 113 insertions, 0 deletions
diff --git a/vcpkg/ports/magnum-integration/portfile.cmake b/vcpkg/ports/magnum-integration/portfile.cmake
new file mode 100644
index 0000000..a16467e
--- /dev/null
+++ b/vcpkg/ports/magnum-integration/portfile.cmake
@@ -0,0 +1,65 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mosra/magnum-integration
+ REF v2020.06
+ SHA512 0b615acdb49ed55bd678a5fb019b1a8ccf522084f3114b2b8dd7e121c27d39ae2aab2879a2e2fa8b083163be711a86f64202fcf380413dec0c705fffd7d649c5
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ bullet WITH_BULLET
+ eigen WITH_EIGEN
+ glm WITH_GLM
+ imgui WITH_IMGUI
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${FEATURE_OPTIONS}
+ -DBUILD_STATIC=${BUILD_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_cmake_config_fixup(PACKAGE_NAME MagnumIntegration CONFIG_PATH share/cmake/MagnumIntegration)
+
+# Debug includes and share are the same as release
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+ "${CURRENT_PACKAGES_DIR}/debug/share"
+)
+
+# Clean up empty directories
+if("${FEATURES}" STREQUAL "core")
+ file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/bin"
+ "${CURRENT_PACKAGES_DIR}/lib"
+ "${CURRENT_PACKAGES_DIR}/debug"
+ )
+ set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
+else()
+ file(GLOB FILES "${CURRENT_PACKAGES_DIR}/debug/*")
+ list(LENGTH FILES COUNT)
+ if(COUNT EQUAL 0)
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+ endif()
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/COPYING"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
+ RENAME copyright)
+
+vcpkg_copy_pdbs()
diff --git a/vcpkg/ports/magnum-integration/vcpkg.json b/vcpkg/ports/magnum-integration/vcpkg.json
new file mode 100644
index 0000000..f54866e
--- /dev/null
+++ b/vcpkg/ports/magnum-integration/vcpkg.json
@@ -0,0 +1,48 @@
+{
+ "name": "magnum-integration",
+ "version-string": "2020.06",
+ "port-version": 3,
+ "description": "Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization",
+ "homepage": "https://magnum.graphics/",
+ "license": null,
+ "dependencies": [
+ {
+ "name": "magnum",
+ "default-features": false
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "bullet": {
+ "description": "BulletIntegration library",
+ "dependencies": [
+ "bullet3"
+ ]
+ },
+ "eigen": {
+ "description": "EigenIntegration library",
+ "dependencies": [
+ "eigen3"
+ ]
+ },
+ "glm": {
+ "description": "GlmIntegration library",
+ "dependencies": [
+ "glm"
+ ]
+ },
+ "imgui": {
+ "description": "ImGuiIntegration library",
+ "dependencies": [
+ "imgui"
+ ]
+ }
+ }
+}