aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/magnum-plugins/CONTROL4
-rw-r--r--ports/magnum-plugins/portfile.cmake52
2 files changed, 56 insertions, 0 deletions
diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL
new file mode 100644
index 000000000..0aec0062d
--- /dev/null
+++ b/ports/magnum-plugins/CONTROL
@@ -0,0 +1,4 @@
+Source: magnum-plugins
+Version: jun2017
+Build-Depends: stb, magnum
+Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php
diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake
new file mode 100644
index 000000000..fae2b08e7
--- /dev/null
+++ b/ports/magnum-plugins/portfile.cmake
@@ -0,0 +1,52 @@
+###
+
+set(MAGNUM_PLUGINS_HASH 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80)
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-plugins-${MAGNUM_PLUGINS_HASH})
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/mosra/magnum-plugins/archive/${MAGNUM_PLUGINS_HASH}.zip"
+ FILENAME "magnum-plugins-${MAGNUM_PLUGINS_HASH}.zip"
+ SHA512 5ab603f50cee325113e3f1ccd67d294d32f7386334136304ad8135ac8ff0218cbd2834197c7db85bb5fd11c69e28d00217fa5d9dbdad71a83e372722a6f8bda0
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(BUILD_STATIC 1)
+else()
+ set(BUILD_STATIC 0)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS -DWITH_STBIMAGECONVERTER=ON
+ OPTIONS -DWITH_STBIMAGEIMPORTER=ON
+ OPTIONS -DWITH_STBTRUETYPEFONT=ON
+ OPTIONS -DWITH_STBTRUETYPEFONT=ON
+ OPTIONS -DWITH_MINIEXRIMAGECONVERTER=ON
+ OPTIONS -DWITH_OPENGEXIMPORTER=ON
+ OPTIONS -DWITH_OPENGEXIMPORTER=ON
+ OPTIONS -DWITH_STANFORDIMPORTER=ON
+ OPTIONS -DWITH_DRWAVAUDIOIMPORTER=ON
+ OPTIONS -DWITH_ANYAUDIOIMPORTER=ON
+ OPTIONS -DWITH_ANYIMAGECONVERTER=ON
+ OPTIONS -DWITH_ANYSCENEIMPORTER=ON
+ OPTIONS -DBUILD_STATIC=${BUILD_STATIC}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+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(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file