aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2019-05-22 21:43:50 -0700
committerGitHub <noreply@github.com>2019-05-22 21:43:50 -0700
commit0bcd82c7ed4178b7e2940e3662c771b4ccb6992e (patch)
tree0629de24c89cd6b1fe8be1888fb8ea42362a6dc4
parent07fd30c6d96dc6833de05b87b76a599444b017ef (diff)
parentc80b4328120503b45fcb76854927bf55ea3a6c16 (diff)
downloadvcpkg-0bcd82c7ed4178b7e2940e3662c771b4ccb6992e.tar.gz
vcpkg-0bcd82c7ed4178b7e2940e3662c771b4ccb6992e.zip
Merge pull request #6505 from cenit/dev/cenit/openmvs
[openmvs] add new port
-rw-r--r--ports/cgal/CONTROL2
-rw-r--r--ports/cgal/cgal_target_fix.patch49
-rw-r--r--ports/cgal/portfile.cmake2
-rw-r--r--ports/openmvs/CONTROL4
-rw-r--r--ports/openmvs/glfw3_target_compat.patch43
-rw-r--r--ports/openmvs/portfile.cmake68
6 files changed, 167 insertions, 1 deletions
diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL
index e3131bb20..d42389635 100644
--- a/ports/cgal/CONTROL
+++ b/ports/cgal/CONTROL
@@ -1,5 +1,5 @@
Source: cgal
-Version: 4.14-1
+Version: 4.14-2
Build-Depends: mpfr, mpir, zlib, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random, boost-foreach, boost-graph, boost-heap, boost-logic, boost-multiprecision
Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry.
diff --git a/ports/cgal/cgal_target_fix.patch b/ports/cgal/cgal_target_fix.patch
new file mode 100644
index 000000000..2fa5155bb
--- /dev/null
+++ b/ports/cgal/cgal_target_fix.patch
@@ -0,0 +1,49 @@
+From a0bfaee9ebed49fb65c93d7fb00a0c24c1898841 Mon Sep 17 00:00:00 2001
+From: Laurent Rineau <laurent.rineau@cgal.org>
+Date: Fri, 10 May 2019 17:31:17 +0200
+Subject: [PATCH 1/2] Consider CGAL as an imported target
+
+---
+ Installation/lib/cmake/CGAL/CGALConfig.cmake | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake
+index c2b0aed549d..08d757aad7f 100644
+--- a/Installation/lib/cmake/CGAL/CGALConfig.cmake
++++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake
+@@ -116,7 +116,11 @@ include(CGAL_setup_target_dependencies)
+ foreach(cgal_lib ${CGAL_LIBRARIES})
+ set(WITH_${cgal_lib} TRUE)
+ if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib})
+- add_library(${cgal_lib} INTERFACE)
++ if(CGAL_BUILDING_LIBS)
++ add_library(${cgal_lib} INTERFACE)
++ else()
++ add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL)
++ endif()
+ if(NOT TARGET CGAL::${cgal_lib})
+ add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib})
+ endif()
+
+From c2e8365303b97669fe50ea2427c9943049575be4 Mon Sep 17 00:00:00 2001
+From: Laurent Rineau <laurent.rineau@cgal.org>
+Date: Fri, 10 May 2019 17:47:58 +0200
+Subject: [PATCH 2/2] Actually, it can only work with CMake>=3.11
+
+---
+ Installation/lib/cmake/CGAL/CGALConfig.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake
+index 08d757aad7f..8ef95a85c94 100644
+--- a/Installation/lib/cmake/CGAL/CGALConfig.cmake
++++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake
+@@ -116,7 +116,7 @@ include(CGAL_setup_target_dependencies)
+ foreach(cgal_lib ${CGAL_LIBRARIES})
+ set(WITH_${cgal_lib} TRUE)
+ if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib})
+- if(CGAL_BUILDING_LIBS)
++ if(CGAL_BUILDING_LIBS OR CMAKE_VERSION VERSION_LESS "3.11")
+ add_library(${cgal_lib} INTERFACE)
+ else()
+ add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL)
diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake
index 58199cc54..873298305 100644
--- a/ports/cgal/portfile.cmake
+++ b/ports/cgal/portfile.cmake
@@ -13,6 +13,8 @@ vcpkg_from_github(
REF releases/CGAL-4.14
SHA512 c70b3ad475f6b2c03ecb540e195b4d26a709205c511b0c705dfddb5b14ef372453ce1d4d49ed342fcd21ba654dea793e91c058afae626276bfb3cfd72bccb382
HEAD_REF master
+ PATCHES
+ cgal_target_fix.patch
)
set(WITH_CGAL_Qt5 OFF)
diff --git a/ports/openmvs/CONTROL b/ports/openmvs/CONTROL
new file mode 100644
index 000000000..2b6c20b71
--- /dev/null
+++ b/ports/openmvs/CONTROL
@@ -0,0 +1,4 @@
+Source: openmvs
+Version: 0.9
+Description: OpenMVS: open Multi-View Stereo reconstruction library
+Build-Depends: zlib, boost, eigen3, ceres, opencv, cgal, glew, glfw3, vcglib
diff --git a/ports/openmvs/glfw3_target_compat.patch b/ports/openmvs/glfw3_target_compat.patch
new file mode 100644
index 000000000..85cbb5490
--- /dev/null
+++ b/ports/openmvs/glfw3_target_compat.patch
@@ -0,0 +1,43 @@
+diff --git a/apps/Viewer/CMakeLists.txt b/apps/Viewer/CMakeLists.txt
+index f1690a6..78466cd 100644
+--- a/apps/Viewer/CMakeLists.txt
++++ b/apps/Viewer/CMakeLists.txt
+@@ -16,28 +16,7 @@ else()
+ MESSAGE("-- Can't find GLEW. Continuing without it.")
+ RETURN()
+ endif()
+-if(CMAKE_COMPILER_IS_GNUCXX)
+- FIND_PACKAGE(PkgConfig QUIET)
+- pkg_search_module(GLFW QUIET glfw3)
+- if(GLFW_FOUND)
+- INCLUDE_DIRECTORIES(${GLFW_INCLUDE_DIRS})
+- ADD_DEFINITIONS(${GLFW_DEFINITIONS})
+- MESSAGE(STATUS "GLFW3 ${GLFW_VERSION} found (include: ${GLFW_INCLUDE_DIRS})")
+- else()
+- MESSAGE("-- Can't find GLFW3. Continuing without it.")
+- RETURN()
+- endif()
+-else()
+- FIND_PACKAGE(glfw3 QUIET)
+- if(glfw3_FOUND)
+- INCLUDE_DIRECTORIES(${glfw3_INCLUDE_DIRS})
+- ADD_DEFINITIONS(${glfw3_DEFINITIONS})
+- MESSAGE(STATUS "GLFW3 ${glfw3_VERSION} found (include: ${glfw3_INCLUDE_DIRS})")
+- else()
+- MESSAGE("-- Can't find GLFW3. Continuing without it.")
+- RETURN()
+- endif()
+-endif()
++FIND_PACKAGE(glfw3 REQUIRED)
+
+ # List sources files
+ FILE(GLOB PCH_C "Common.cpp")
+@@ -54,7 +33,7 @@ FILE(GLOB LIBRARY_FILES_H "*.h" "*.inl")
+ LIST(REMOVE_ITEM LIBRARY_FILES_C ${PCH_C})
+ SET(LIBRARY_FILES_C "${PCH_C};${LIBRARY_FILES_C}")
+
+-cxx_executable_with_flags_no_pch(${VIEWER_NAME} "Apps" "${cxx_default}" "MVS;${OPENGL_LIBRARIES};${GLEW_LIBRARY};${GLFW_STATIC_LIBRARIES};GLEW::GLEW;${glfw3_LIBRARY};${GLFW3_LIBRARY};glfw" ${LIBRARY_FILES_C} ${LIBRARY_FILES_H})
++cxx_executable_with_flags_no_pch(${VIEWER_NAME} "Apps" "${cxx_default}" "MVS;${OPENGL_LIBRARIES};${GLEW_LIBRARY};GLEW::GLEW;glfw" ${LIBRARY_FILES_C} ${LIBRARY_FILES_H})
+
+ # Manually set Common.h as the precompiled header
+ set_target_pch(${VIEWER_NAME} Common.h)
diff --git a/ports/openmvs/portfile.cmake b/ports/openmvs/portfile.cmake
new file mode 100644
index 000000000..790951b18
--- /dev/null
+++ b/ports/openmvs/portfile.cmake
@@ -0,0 +1,68 @@
+include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO cdcseacave/openMVS
+ REF v0.9
+ SHA512 a1081ee8562324137273846526c6570c77b35dba6a1a46df4e67f19cf7d0a1a4d4f6091b9444b66e0ca322f466b418ce4535d0c7ce10000df389cbe615f0c0b6
+ HEAD_REF master
+ PATCHES
+ glfw3_target_compat.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/openmvs)
+else()
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/CMake/OpenMVS TARGET_PATH share/openmvs)
+endif()
+
+#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it
+if(CMAKE_HOST_WIN32)
+set(EXECUTABLE_SUFFIX ".exe")
+else()
+set(EXECUTABLE_SUFFIX "")
+endif()
+
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX})
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX})
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX})
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX})
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX})
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX})
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openmvs/)
+if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX}")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/DensifyPointCloud${EXECUTABLE_SUFFIX})
+endif()
+if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX}")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/InterfaceCOLMAP${EXECUTABLE_SUFFIX})
+endif()
+if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX}")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/InterfaceVisualSFM${EXECUTABLE_SUFFIX})
+endif()
+if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX}")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/ReconstructMesh${EXECUTABLE_SUFFIX})
+endif()
+if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX}")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/RefineMesh${EXECUTABLE_SUFFIX})
+endif()
+if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX}")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/TextureMesh${EXECUTABLE_SUFFIX})
+endif()
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openmvs)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmvs RENAME copyright)