aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2019-11-22 09:27:02 -0800
committerGitHub <noreply@github.com>2019-11-22 09:27:02 -0800
commitb6a50cb6a76a7f84adfb4f7b5f2e339b34e3e112 (patch)
tree9024b07d375a799d7e171dd0f22c4bfecc4f5db4
parent0741eae0fe4a941a968df4c445866c89ca1d876f (diff)
parent0fe861eb07b419dacff6e05ce406db4f25f49fd0 (diff)
downloadvcpkg-b6a50cb6a76a7f84adfb4f7b5f2e339b34e3e112.tar.gz
vcpkg-b6a50cb6a76a7f84adfb4f7b5f2e339b34e3e112.zip
Merge pull request #8659 from maxGimeno/CGAL-5.0
[cgal][openmvs] CGAL: Upgrade to 5.0
-rw-r--r--ports/cgal/CONTROL4
-rw-r--r--ports/cgal/cgal_target_fix.patch49
-rw-r--r--ports/cgal/portfile.cmake7
-rw-r--r--ports/cgal/usage5
-rw-r--r--ports/openmvs/CONTROL2
-rwxr-xr-xports/openmvs/cgal-5.0.patch40
-rw-r--r--ports/openmvs/portfile.cmake1
7 files changed, 52 insertions, 56 deletions
diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL
index 5d7879fe0..3f71a911a 100644
--- a/ports/cgal/CONTROL
+++ b/ports/cgal/CONTROL
@@ -1,6 +1,6 @@
Source: cgal
-Version: 4.14-3
-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
+Version: 5.0
+Build-Depends: mpfr, mpir, zlib, boost-format, boost-container, boost-ptr-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random, boost-foreach, boost-graph, boost-heap, boost-logic, boost-multiprecision
Homepage: https://github.com/CGAL/cgal
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
deleted file mode 100644
index 2fa5155bb..000000000
--- a/ports/cgal/cgal_target_fix.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-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 1a006116d..d351af738 100644
--- a/ports/cgal/portfile.cmake
+++ b/ports/cgal/portfile.cmake
@@ -5,11 +5,9 @@ vcpkg_buildpath_length_warning(37)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO CGAL/cgal
- REF releases/CGAL-4.14
- SHA512 c70b3ad475f6b2c03ecb540e195b4d26a709205c511b0c705dfddb5b14ef372453ce1d4d49ed342fcd21ba654dea793e91c058afae626276bfb3cfd72bccb382
+ REF releases/CGAL-5.0
+ SHA512 c7462f1f5ca1ef154a3a20ce4c1b63e544ad7e62ea0afb9aee99872402362fa2001a52740d62ac779e75f1354ad9c955a895f3cad12186e3b75d91f0f3452847
HEAD_REF master
- PATCHES
- cgal_target_fix.patch
)
set(WITH_CGAL_Qt5 OFF)
@@ -60,4 +58,5 @@ file(
DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal
)
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal)
vcpkg_test_cmake(PACKAGE_NAME CGAL)
diff --git a/ports/cgal/usage b/ports/cgal/usage
new file mode 100644
index 000000000..9ea12d70b
--- /dev/null
+++ b/ports/cgal/usage
@@ -0,0 +1,5 @@
+The package cgal provides CMake targets:
+
+ find_package(CGAL CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE CGAL::CGAL)
+
diff --git a/ports/openmvs/CONTROL b/ports/openmvs/CONTROL
index 8efa8ff0a..1708205a8 100644
--- a/ports/openmvs/CONTROL
+++ b/ports/openmvs/CONTROL
@@ -1,4 +1,4 @@
Source: openmvs
-Version: 1.0-2
+Version: 1.0-3
Description: OpenMVS: open Multi-View Stereo reconstruction library
Build-Depends: zlib, boost-iostreams, boost-program-options, boost-system, boost-serialization, eigen3, ceres, opencv, cgal[core], glew, glfw3, vcglib
diff --git a/ports/openmvs/cgal-5.0.patch b/ports/openmvs/cgal-5.0.patch
new file mode 100755
index 000000000..042bf9dab
--- /dev/null
+++ b/ports/openmvs/cgal-5.0.patch
@@ -0,0 +1,40 @@
+diff --git a/libs/MVS/DepthMap.cpp b/libs/MVS/DepthMap.cpp
+index 12973ac..f6621f0 100644
+--- a/libs/MVS/DepthMap.cpp
++++ b/libs/MVS/DepthMap.cpp
+@@ -1071,16 +1071,25 @@ void MVS::EstimatePointNormals(const ImageArr& images, PointCloud& pointcloud, i
+ // estimates normals direction;
+ // Note: pca_estimate_normals() requires an iterator over points
+ // as well as property maps to access each point's position and normal.
+- #if CGAL_VERSION_NR < 1040800000
+- CGAL::pca_estimate_normals(
+- #else
+- CGAL::pca_estimate_normals<CGAL::Sequential_tag>(
+- #endif
+- pointvectors.begin(), pointvectors.end(),
+- CGAL::First_of_pair_property_map<PointVectorPair>(),
+- CGAL::Second_of_pair_property_map<PointVectorPair>(),
+- numNeighbors
+- );
++ #if CGAL_VERSION_NR < 1041301000
++ #if CGAL_VERSION_NR < 1040800000
++ CGAL::pca_estimate_normals(
++ #else
++ CGAL::pca_estimate_normals<CGAL::Sequential_tag>(
++ #endif
++ pointvectors.begin(), pointvectors.end(),
++ CGAL::First_of_pair_property_map<PointVectorPair>(),
++ CGAL::Second_of_pair_property_map<PointVectorPair>(),
++ numNeighbors
++ );
++ #else
++ CGAL::pca_estimate_normals<CGAL::Sequential_tag>(
++ pointvectors,
++ numNeighbors,
++ CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>())
++ .normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>())
++ );
++ #endif
+ // store the point normals
+ pointcloud.normals.Resize(pointcloud.points.GetSize());
+ FOREACH(i, pointcloud.normals) {
diff --git a/ports/openmvs/portfile.cmake b/ports/openmvs/portfile.cmake
index 6eb30f6f8..eceb605b5 100644
--- a/ports/openmvs/portfile.cmake
+++ b/ports/openmvs/portfile.cmake
@@ -11,6 +11,7 @@ vcpkg_from_github(
PATCHES
glfw3_target_compat.patch
boost-1.71.patch
+ cgal-5.0.patch
)
vcpkg_configure_cmake(