From 1831ce4bcc6f0ca18c3425563bc2de8857f30e41 Mon Sep 17 00:00:00 2001 From: sigman Date: Wed, 7 Jun 2017 22:08:08 +0300 Subject: Magnum OpengGL 3d library port Added ports to support Magnum C++ OpenGL engine http://mosra.cz/blog/magnum.php and its direct dependencies --- ports/corrade/CONTROL | 3 +++ ports/corrade/portfile.cmake | 45 ++++++++++++++++++++++++++++++++++++++++++++ ports/magnum/CONTROL | 4 ++++ ports/magnum/portfile.cmake | 33 ++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 ports/corrade/CONTROL create mode 100644 ports/corrade/portfile.cmake create mode 100644 ports/magnum/CONTROL create mode 100644 ports/magnum/portfile.cmake diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL new file mode 100644 index 000000000..487766e89 --- /dev/null +++ b/ports/corrade/CONTROL @@ -0,0 +1,3 @@ +Source: corrade +Version: jun2017 +Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake new file mode 100644 index 000000000..91251ea6b --- /dev/null +++ b/ports/corrade/portfile.cmake @@ -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() \ No newline at end of file diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL new file mode 100644 index 000000000..d07dd3160 --- /dev/null +++ b/ports/magnum/CONTROL @@ -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 diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake new file mode 100644 index 000000000..10f9be3c5 --- /dev/null +++ b/ports/magnum/portfile.cmake @@ -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() \ No newline at end of file -- cgit v1.2.3 From f0605ca60a560ab1358177beec58a53068128753 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 8 Jun 2017 02:48:04 +0300 Subject: [Magnum] Fix static library build Fixes cmake scripts to build a static version of the libraries. --- ports/corrade/portfile.cmake | 12 ++++++++++++ ports/magnum/portfile.cmake | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 91251ea6b..2f5578b43 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -13,9 +13,16 @@ vcpkg_download_distfile(ARCHIVE ) 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 -DBUILD_STATIC=${BUILD_STATIC} # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 @@ -38,6 +45,11 @@ file(GLOB_RECURSE TO_REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(REMOVE ${TO_REMOVE}) +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/corrade) file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 10f9be3c5..71517c15c 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -11,10 +11,17 @@ vcpkg_download_distfile(ARCHIVE ) 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_SDL2APPLICATION=ON + OPTIONS -DBUILD_STATIC=${BUILD_STATIC} # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 @@ -25,6 +32,10 @@ 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) -- cgit v1.2.3 From 741caef3fb352f6fbd5d4d59592f0c2629892064 Mon Sep 17 00:00:00 2001 From: sigman Date: Fri, 9 Jun 2017 15:09:05 +0300 Subject: [Magnum][Corrade] Cleanup and Audio support Enabled audio support in magnum by default via openal-soft dependency. --- ports/corrade/portfile.cmake | 3 --- ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 2f5578b43..76979496b 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -23,9 +23,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DBUILD_STATIC=${BUILD_STATIC} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index d07dd3160..f934ba0a6 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum Version: jun2017 -Build-Depends: corrade, sdl2 +Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 71517c15c..dd934b31d 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -21,10 +21,9 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DWITH_SDL2APPLICATION=ON + OPTIONS -DWITH_AUDIO=ON + OPTIONS -DWITH_WAVAUDIOIMPORTER=ON OPTIONS -DBUILD_STATIC=${BUILD_STATIC} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() -- cgit v1.2.3 From 1b761052002a9466704d53ea5b5029df9e89aaa0 Mon Sep 17 00:00:00 2001 From: sigman Date: Fri, 9 Jun 2017 15:17:01 +0300 Subject: [Magnum-plugins] Import plugins for the magnum opengl library Added magnum-plugins library with the reasonable defaults and minimal dependencies . --- ports/magnum-plugins/CONTROL | 4 +++ ports/magnum-plugins/portfile.cmake | 52 +++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 ports/magnum-plugins/CONTROL create mode 100644 ports/magnum-plugins/portfile.cmake 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 -- cgit v1.2.3 From 8cbadbffdcf0f1f4d5acd16012ecbb47532bdac9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 20:38:25 -0700 Subject: [corrade][magnum-plugins][magnum] Use vcpkg_from_github() --- ports/corrade/CONTROL | 2 +- ports/corrade/portfile.cmake | 25 ++++++++------------- ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 43 +++++++++++++++++-------------------- ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 25 ++++++++++----------- 6 files changed, 43 insertions(+), 56 deletions(-) diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index 487766e89..748d0c61a 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,3 @@ Source: corrade -Version: jun2017 +Version: jun2017-1 Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 76979496b..113d24dc7 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -1,17 +1,11 @@ -# - -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_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/corrade + REF b87c50db3543367b6eb20dc72246c6687449b029 + SHA512 882ccba210c6db7dc8a70e425e1cc119dd1c1a880b8b7d36b2c9478a2105294294680495e7bafb8c0bc7f667bd247dbd008e8ff133a8ea26b13df781a8896297 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -31,11 +25,10 @@ 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/) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) + # Tools require dlls -file(GLOB TO_COPY - ${CURRENT_PACKAGES_DIR}/bin/*.dll) -file(COPY ${TO_COPY} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade) file(GLOB_RECURSE TO_REMOVE ${CURRENT_PACKAGES_DIR}/bin/*.exe diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 0aec0062d..1bf1111c4 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017 +Version: jun2017-1 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 index fae2b08e7..199789c99 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -1,15 +1,11 @@ -### - -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_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-plugins + REF 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80 + SHA512 73c7fb7e9a5a9e2a4ee7314b5d41d98ada9cf1a50c1cd833c2ae19c5bdab66862f3696f142e987f9d2b551142e94f96a2d8ccad37625682c8391400091dcf879 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -20,19 +16,20 @@ 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} + OPTIONS + -DWITH_STBIMAGECONVERTER=ON + -DWITH_STBIMAGEIMPORTER=ON + -DWITH_STBTRUETYPEFONT=ON + -DWITH_STBTRUETYPEFONT=ON + -DWITH_MINIEXRIMAGECONVERTER=ON + -DWITH_OPENGEXIMPORTER=ON + -DWITH_OPENGEXIMPORTER=ON + -DWITH_STANFORDIMPORTER=ON + -DWITH_DRWAVAUDIOIMPORTER=ON + -DWITH_ANYAUDIOIMPORTER=ON + -DWITH_ANYIMAGECONVERTER=ON + -DWITH_ANYSCENEIMPORTER=ON + -DBUILD_STATIC=${BUILD_STATIC} ) vcpkg_install_cmake() diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index f934ba0a6..a110136f2 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017 +Version: jun2017-1 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index dd934b31d..67d1f825a 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -1,15 +1,11 @@ -### - -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_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum + REF c8416ca4c3e9b68ba62acc9f73de235526cb3d6e + SHA512 d595be48ae44d944d5747880e0108bdc445b92fcc306f0169699e2b80500919647063ac88ef67491b2d8e92ae1f0612cd8768fc63d8cc4ffe4c625988b63504d + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -20,10 +16,11 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DWITH_SDL2APPLICATION=ON - OPTIONS -DWITH_AUDIO=ON - OPTIONS -DWITH_WAVAUDIOIMPORTER=ON - OPTIONS -DBUILD_STATIC=${BUILD_STATIC} + OPTIONS + -DWITH_SDL2APPLICATION=ON + -DWITH_AUDIO=ON + -DWITH_WAVAUDIOIMPORTER=ON + -DBUILD_STATIC=${BUILD_STATIC} ) vcpkg_install_cmake() -- cgit v1.2.3 From 27db5c14bbe9025dd5953b6cd4accb51e4be0501 Mon Sep 17 00:00:00 2001 From: sigman Date: Sat, 10 Jun 2017 17:48:40 +0300 Subject: [magnum-plugins] Patch for missing include vs2017 regression --- ports/magnum-plugins/001-fix-include.patch | 12 ++++++++++++ ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ports/magnum-plugins/001-fix-include.patch diff --git a/ports/magnum-plugins/001-fix-include.patch b/ports/magnum-plugins/001-fix-include.patch new file mode 100644 index 000000000..c6aa9c755 --- /dev/null +++ b/ports/magnum-plugins/001-fix-include.patch @@ -0,0 +1,12 @@ +diff --git a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp +index c94ee98..843d1ec 100644 +--- a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp ++++ b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp +@@ -25,6 +25,7 @@ + + #include + #include ++#include + #include + + #include "MagnumPlugins/OpenGexImporter/OpenDdl/Document.h" diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 1bf1111c4..087383c4a 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-1 +Version: jun2017-2 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 index 199789c99..dde435ee4 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -7,6 +7,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-include.patch +) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) else() -- cgit v1.2.3 From 61dbead6fc9dc3b27515db9fbc4d48e772f298bd Mon Sep 17 00:00:00 2001 From: sigman78 Date: Tue, 13 Jun 2017 12:35:54 +0300 Subject: [magnum] Patch SDL2 includes, msbuild compatibility Concerning SDL2 includes and how do they work. It is seems what the common practice is to append 'SDL2' include path to the compiler options and then do plain #include "SDL.h". While it works in cmake based projects it won't pass in msbuild ones. This patch changes #include to 'global' style and solves the problem. --- ports/magnum/001-sdl-includes.patch | 20 ++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ports/magnum/001-sdl-includes.patch diff --git a/ports/magnum/001-sdl-includes.patch b/ports/magnum/001-sdl-includes.patch new file mode 100644 index 000000000..afa1301d9 --- /dev/null +++ b/ports/magnum/001-sdl-includes.patch @@ -0,0 +1,20 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h +index 99c3174..311b2c1 100644 +--- a/src/Magnum/Platform/Sdl2Application.h ++++ b/src/Magnum/Platform/Sdl2Application.h +@@ -42,11 +42,11 @@ + #ifdef CORRADE_TARGET_WINDOWS /* Windows version of SDL2 redefines main(), we don't want that */ + #define SDL_MAIN_HANDLED + #endif +-#include +-#include ++#include ++#include + + #ifdef CORRADE_TARGET_WINDOWS_RT +-#include /* For SDL_WinRTRunApp */ ++#include /* For SDL_WinRTRunApp */ + #include /* For the WinMain entrypoint */ + #endif + + diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index a110136f2..c4530c254 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-1 +Version: jun2017-2 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 67d1f825a..81e2123b6 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -7,6 +7,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch +) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) else() -- cgit v1.2.3 From 4167807f09e3f772a87d0f1f0ae5f51f9cdc5610 Mon Sep 17 00:00:00 2001 From: sigman78 Date: Tue, 13 Jun 2017 15:20:29 +0300 Subject: [magnum] Emit plugin binary path to the header Drop-in solution for the msbuild users. --- ports/magnum/002-magnum-defs.patch | 26 ++++++++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 6 +++++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 ports/magnum/002-magnum-defs.patch diff --git a/ports/magnum/002-magnum-defs.patch b/ports/magnum/002-magnum-defs.patch new file mode 100644 index 000000000..de7d1cb10 --- /dev/null +++ b/ports/magnum/002-magnum-defs.patch @@ -0,0 +1,26 @@ +diff --git a/src/Magnum/configure.h.cmake b/src/Magnum/configure.h.cmake +index 6a752d4..cd1277b 100644 +--- a/src/Magnum/configure.h.cmake ++++ b/src/Magnum/configure.h.cmake +@@ -35,4 +35,23 @@ + #cmakedefine MAGNUM_TARGET_WEBGL + #cmakedefine MAGNUM_TARGET_HEADLESS + ++// Plugin directories ++#ifdef _DEBUG ++#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}" ++#else ++#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_DIR}" ++#endif ++ + #endif diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index c4530c254..9160e2287 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-2 +Version: jun2017-3 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 81e2123b6..3aed5a737 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -9,7 +9,9 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch + ${CMAKE_CURRENT_LIST_DIR}/002-magnum-defs.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -26,6 +28,8 @@ vcpkg_configure_cmake( -DWITH_AUDIO=ON -DWITH_WAVAUDIOIMPORTER=ON -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_install_cmake() -- cgit v1.2.3 From 7b9275f1b35e6533dc63d1f1dd7b61066216e3f1 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 15 Jun 2017 17:49:43 +0300 Subject: [corrade][magnum][magnum-plugins] Updated to upstream, enabled more features in [magnum] Removed plugin location defines. Fixed tools search path in FindCorrade, FindMagnum cmake modules. --- ports/corrade/CONTROL | 2 +- ports/corrade/portfile.cmake | 4 ++-- ports/magnum-plugins/001-fix-include.patch | 12 ------------ ports/magnum-plugins/001-tools-path.patch | 26 ++++++++++++++++++++++++++ ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 7 ++++--- ports/magnum/002-magnum-defs.patch | 26 -------------------------- ports/magnum/002-tools-path.patch | 26 ++++++++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 30 +++++++++++++++++++++++++++--- 10 files changed, 88 insertions(+), 49 deletions(-) delete mode 100644 ports/magnum-plugins/001-fix-include.patch create mode 100644 ports/magnum-plugins/001-tools-path.patch delete mode 100644 ports/magnum/002-magnum-defs.patch create mode 100644 ports/magnum/002-tools-path.patch diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index 748d0c61a..d8fb3681a 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,3 @@ Source: corrade -Version: jun2017-1 +Version: jun2017-2 Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 113d24dc7..3ae3710f6 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF b87c50db3543367b6eb20dc72246c6687449b029 - SHA512 882ccba210c6db7dc8a70e425e1cc119dd1c1a880b8b7d36b2c9478a2105294294680495e7bafb8c0bc7f667bd247dbd008e8ff133a8ea26b13df781a8896297 + REF c182fe636894a998f241212d0205d0c126b7926f + SHA512 e62486368eab9c5f90ef9f4af91500f465d9e3baa6e5f6e9f2a49844d09676faefcb965a9d5b27a54eda19436af6b23dcda19504be6cd0dcd52dfad2ad4bfa21 HEAD_REF master ) diff --git a/ports/magnum-plugins/001-fix-include.patch b/ports/magnum-plugins/001-fix-include.patch deleted file mode 100644 index c6aa9c755..000000000 --- a/ports/magnum-plugins/001-fix-include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -index c94ee98..843d1ec 100644 ---- a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -+++ b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -@@ -25,6 +25,7 @@ - - #include - #include -+#include - #include - - #include "MagnumPlugins/OpenGexImporter/OpenDdl/Document.h" diff --git a/ports/magnum-plugins/001-tools-path.patch b/ports/magnum-plugins/001-tools-path.patch new file mode 100644 index 000000000..18a351c2e --- /dev/null +++ b/ports/magnum-plugins/001-tools-path.patch @@ -0,0 +1,26 @@ +diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake +index e63bc03..052006f 100644 +--- a/modules/FindCorrade.cmake ++++ b/modules/FindCorrade.cmake +@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) + if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) + add_executable(Corrade::${_component} IMPORTED) + +- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) ++ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) + mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) + + if(CORRADE_${_COMPONENT}_EXECUTABLE) +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8df555d..12f7aa4 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) + add_executable(Magnum::${_component} IMPORTED) + +- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) ++ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) + mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) + + if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 087383c4a..9d684689a 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-2 +Version: jun2017-3 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 index dde435ee4..0fe8f83a1 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -2,14 +2,15 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80 - SHA512 73c7fb7e9a5a9e2a4ee7314b5d41d98ada9cf1a50c1cd833c2ae19c5bdab66862f3696f142e987f9d2b551142e94f96a2d8ccad37625682c8391400091dcf879 + REF 34a3bc34335ca05097e735db19fe1fae81dbfbb5 + SHA512 918c3eeae246d1ac67e3595c50ff599872a0c1498e9a8a0386ad656f3d9d2209b048b53c25f198660e15201147795578c5c931b00116da46fd77d8e91c0826cb HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-include.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-tools-path.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) diff --git a/ports/magnum/002-magnum-defs.patch b/ports/magnum/002-magnum-defs.patch deleted file mode 100644 index de7d1cb10..000000000 --- a/ports/magnum/002-magnum-defs.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/Magnum/configure.h.cmake b/src/Magnum/configure.h.cmake -index 6a752d4..cd1277b 100644 ---- a/src/Magnum/configure.h.cmake -+++ b/src/Magnum/configure.h.cmake -@@ -35,4 +35,23 @@ - #cmakedefine MAGNUM_TARGET_WEBGL - #cmakedefine MAGNUM_TARGET_HEADLESS - -+// Plugin directories -+#ifdef _DEBUG -+#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}" -+#else -+#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_DIR}" -+#endif -+ - #endif diff --git a/ports/magnum/002-tools-path.patch b/ports/magnum/002-tools-path.patch new file mode 100644 index 000000000..18a351c2e --- /dev/null +++ b/ports/magnum/002-tools-path.patch @@ -0,0 +1,26 @@ +diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake +index e63bc03..052006f 100644 +--- a/modules/FindCorrade.cmake ++++ b/modules/FindCorrade.cmake +@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) + if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) + add_executable(Corrade::${_component} IMPORTED) + +- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) ++ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) + mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) + + if(CORRADE_${_COMPONENT}_EXECUTABLE) +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8df555d..12f7aa4 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) + add_executable(Magnum::${_component} IMPORTED) + +- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) ++ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) + mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) + + if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 9160e2287..9245e4380 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-3 +Version: jun2017-4 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 3aed5a737..14d5e0846 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF c8416ca4c3e9b68ba62acc9f73de235526cb3d6e - SHA512 d595be48ae44d944d5747880e0108bdc445b92fcc306f0169699e2b80500919647063ac88ef67491b2d8e92ae1f0612cd8768fc63d8cc4ffe4c625988b63504d + REF ed7eac0b42a598dff8984830e7f943dd6af07deb + SHA512 843e209b82b4f6f7c3f9612aec2641a28cb09361eefefe435bb7d2c06d0e4df65b6b9adf5893222cf31ddc3ccec967eb343da1da6180e9fbfef1b26234e145d5 HEAD_REF master ) @@ -11,7 +11,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch - ${CMAKE_CURRENT_LIST_DIR}/002-magnum-defs.patch + ${CMAKE_CURRENT_LIST_DIR}/002-tools-path.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -25,15 +25,39 @@ vcpkg_configure_cmake( PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DWITH_SDL2APPLICATION=ON + -DWITH_WINDOWLESSWGLAPPLICATION=ON + -DWITH_WGLCONTEXT=ON + -DWITH_OPENGLTESTER=ON -DWITH_AUDIO=ON -DWITH_WAVAUDIOIMPORTER=ON + -DWITH_MAGNUMFONT=ON + -DWITH_MAGNUMFONTCONVERTER=ON + -DWITH_OBJIMPORTER=ON + -DWITH_TGAIMPORTER=ON + -DWITH_DISTANCEFIELDCONVERTER=ON + -DWITH_FONTCONVERTER=ON + -DWITH_TGAIMAGECONVERTER=ON -DBUILD_STATIC=${BUILD_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum + --trace ) vcpkg_install_cmake() +# Drop a copy of tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) + +# Tools require dlls +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum) + +file(GLOB_RECURSE TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${TO_REMOVE}) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From bffa100a43c995b56b782f0de64dbaabb4f1f2a1 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 22 Jun 2017 13:29:00 +0300 Subject: [magnum][magnum-plugins] Fixed plugins location, static plugins build Static libray linkage should work now, including plugins. --- ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 20 ++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 15 +++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 9d684689a..f6e194c9f 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-3 +Version: jun2017-4 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 index 0fe8f83a1..b26262490 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -15,8 +15,10 @@ vcpkg_apply_patches( if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) else() set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) endif() vcpkg_configure_cmake( @@ -36,6 +38,9 @@ vcpkg_configure_cmake( -DWITH_ANYIMAGECONVERTER=ON -DWITH_ANYSCENEIMPORTER=ON -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_install_cmake() @@ -46,6 +51,21 @@ 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) + # 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() + # remove headers and libs for plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + # hint vcpkg + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) endif() # Handle copyright diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 9245e4380..a040014da 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-4 +Version: jun2017-5 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 14d5e0846..9eff36dcf 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -16,8 +16,10 @@ vcpkg_apply_patches( if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) else() set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) endif() vcpkg_configure_cmake( @@ -38,6 +40,7 @@ vcpkg_configure_cmake( -DWITH_FONTCONVERTER=ON -DWITH_TGAIMAGECONVERTER=ON -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 --trace @@ -64,6 +67,18 @@ 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) + # 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() + # remove headers and libs for plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) endif() # Handle copyright -- cgit v1.2.3