Magnum OpengGL 3d library port

Added ports to support Magnum C++ OpenGL engine http://mosra.cz/blog/magnum.php and its direct dependencies
This commit is contained in:
sigman 2017-06-07 22:08:08 +03:00
parent 9a698d7088
commit 1831ce4bcc
4 changed files with 85 additions and 0 deletions

3
ports/corrade/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: corrade
Version: jun2017
Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php

View File

@ -0,0 +1,45 @@
#
set(CORRADE_HASH b87c50db3543367b6eb20dc72246c6687449b029)
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/corrade-${CORRADE_HASH})
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/mosra/corrade/archive/${CORRADE_HASH}.zip"
FILENAME "corrade-${CORRADE_HASH}.zip"
SHA512 b15b544f996b8c95fbdf73ff9b76deea465fdcf06f431b09f4bbb9a786f4e864fdb4f8c5a2977cb366ee2398c54eac4c469da29c2ab7c67d3b8f7cbf7d2120dc
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
# Drop a copy of tools
file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/)
# Tools require dlls
file(GLOB TO_COPY
${CURRENT_PACKAGES_DIR}/bin/*.dll)
file(COPY ${TO_COPY} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/)
file(GLOB_RECURSE TO_REMOVE
${CURRENT_PACKAGES_DIR}/bin/*.exe
${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${TO_REMOVE})
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright)
vcpkg_copy_pdbs()

4
ports/magnum/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: magnum
Version: jun2017
Build-Depends: corrade, sdl2
Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php

View File

@ -0,0 +1,33 @@
###
set(MAGNUM_HASH c8416ca4c3e9b68ba62acc9f73de235526cb3d6e)
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-${MAGNUM_HASH})
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/mosra/magnum/archive/${MAGNUM_HASH}.zip"
FILENAME "magnum-${MAGNUM_HASH}.zip"
SHA512 1248efaba22568a753396192624690a478c69946cdbbffe83e34cb85d54ec65756b693e025bf477fc192e6fecce56dc1b68631e1a763986267b83d6530af6ef4
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
OPTIONS -DWITH_SDL2APPLICATION=ON
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum/copyright)
vcpkg_copy_pdbs()