mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 19:17:10 +01:00
Merge pull request #8659 from maxGimeno/CGAL-5.0
[cgal][openmvs] CGAL: Upgrade to 5.0
This commit is contained in:
commit
b6a50cb6a7
@ -1,6 +1,6 @@
|
|||||||
Source: cgal
|
Source: cgal
|
||||||
Version: 4.14-3
|
Version: 5.0
|
||||||
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
|
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
|
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.
|
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.
|
||||||
|
|
||||||
|
@ -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)
|
|
@ -5,11 +5,9 @@ vcpkg_buildpath_length_warning(37)
|
|||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO CGAL/cgal
|
REPO CGAL/cgal
|
||||||
REF releases/CGAL-4.14
|
REF releases/CGAL-5.0
|
||||||
SHA512 c70b3ad475f6b2c03ecb540e195b4d26a709205c511b0c705dfddb5b14ef372453ce1d4d49ed342fcd21ba654dea793e91c058afae626276bfb3cfd72bccb382
|
SHA512 c7462f1f5ca1ef154a3a20ce4c1b63e544ad7e62ea0afb9aee99872402362fa2001a52740d62ac779e75f1354ad9c955a895f3cad12186e3b75d91f0f3452847
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES
|
|
||||||
cgal_target_fix.patch
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(WITH_CGAL_Qt5 OFF)
|
set(WITH_CGAL_Qt5 OFF)
|
||||||
@ -60,4 +58,5 @@ file(
|
|||||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal
|
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)
|
vcpkg_test_cmake(PACKAGE_NAME CGAL)
|
||||||
|
5
ports/cgal/usage
Normal file
5
ports/cgal/usage
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
The package cgal provides CMake targets:
|
||||||
|
|
||||||
|
find_package(CGAL CONFIG REQUIRED)
|
||||||
|
target_link_libraries(main PRIVATE CGAL::CGAL)
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
Source: openmvs
|
Source: openmvs
|
||||||
Version: 1.0-2
|
Version: 1.0-3
|
||||||
Description: OpenMVS: open Multi-View Stereo reconstruction library
|
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
|
Build-Depends: zlib, boost-iostreams, boost-program-options, boost-system, boost-serialization, eigen3, ceres, opencv, cgal[core], glew, glfw3, vcglib
|
||||||
|
40
ports/openmvs/cgal-5.0.patch
Executable file
40
ports/openmvs/cgal-5.0.patch
Executable file
@ -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) {
|
@ -11,6 +11,7 @@ vcpkg_from_github(
|
|||||||
PATCHES
|
PATCHES
|
||||||
glfw3_target_compat.patch
|
glfw3_target_compat.patch
|
||||||
boost-1.71.patch
|
boost-1.71.patch
|
||||||
|
cgal-5.0.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user