Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37570511
en ru br
Репозитории ALT

Группа :: Графика
Пакет: meshlab

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: meshlab-2021.07-system-levmar.patch
Скачать


diff -up meshlab-Meshlab-2021.07/src/cmake/FindLevmar.cmake.system-levmar meshlab-Meshlab-2021.07/src/cmake/FindLevmar.cmake
--- meshlab-Meshlab-2021.07/src/cmake/FindLevmar.cmake.system-levmar	2021-09-20 13:55:45.930168287 -0400
+++ meshlab-Meshlab-2021.07/src/cmake/FindLevmar.cmake	2021-09-20 13:55:45.930168287 -0400
@@ -0,0 +1,54 @@
+# - Find levmar
+# Find the levmar library
+#
+#  Levmar::Levmar - Imported target to use
+#  LEVMAR_FOUND - True if levmar was found.
+#
+# Original Author:
+# 2020 Tom Callaway <spot@fedoraproject.org>
+#
+# Based on code by:
+# Collabora, Ltd. 2019
+# 2019 Ryan Pavlik <ryan.pavlik@collabora.com> <ryan.pavlik@gmail.com>
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+# SPDX-License-Identifier: BSL-1.0
+
+set(LEVMAR_ROOT_DIR
+    "${LEVMAR_ROOT_DIR}"
+	CACHE
+	PATH
+    "Directory to search for liblevmar")
+find_path(LEVMAR_INCLUDE_DIR
+    NAMES
+    levmar.h
+    PATHS
+    "${LEVMAR_ROOT_DIR}")
+find_library(LEVMAR_LIBRARY
+    NAMES levmar
+    PATHS
+    "${LEVMAR_ROOT_DIR}")
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Levmar
+    DEFAULT_MSG
+    LEVMAR_INCLUDE_DIR
+    LEVMAR_LIBRARY)
+
+if(LEVMAR_FOUND)
+    if(NOT TARGET Levmar::Levmar)
+        add_library(Levmar::Levmar UNKNOWN IMPORTED)
+        set_target_properties(Levmar::Levmar
+            PROPERTIES
+            IMPORTED_LOCATION "${LEVMAR_LIBRARY}"
+            INTERFACE_INCLUDE_DIRECTORIES "${LEVMAR_INCLUDE_DIR}")
+    endif()
+    set(LEVMAR_INCLUDE_DIRS ${LEVMAR_INCLUDE_DIR})
+    set(LEVMAR_LIBRARIES ${LEVMAR_LIBRARY})
+    mark_as_advanced(LEVMAR_ROOT_DIR)
+endif()
+
+mark_as_advanced(LEVMAR_INCLUDE_DIR LEVMAR_LIBRARY)
diff -up meshlab-Meshlab-2021.07/src/CMakeLists.txt.system-levmar meshlab-Meshlab-2021.07/src/CMakeLists.txt
diff -up meshlab-Meshlab-2021.07/src/external/levmar.cmake.system-levmar meshlab-Meshlab-2021.07/src/external/levmar.cmake
--- meshlab-Meshlab-2021.07/src/external/levmar.cmake.system-levmar	2021-09-20 13:59:39.050450142 -0400
+++ meshlab-Meshlab-2021.07/src/external/levmar.cmake	2021-09-20 14:04:29.799030637 -0400
@@ -3,10 +3,16 @@
 # SPDX-License-Identifier: BSL-1.0
 
 option(ALLOW_BUNDLED_LEVMAR "Allow use of bundled levmar source" ON)
+option(ALLOW_SYSTEM_LEVMAR "Allow use of system-provided levmar" ON)
 
+find_package(Levmar)
 set(LEVMAR_DIR ${CMAKE_CURRENT_LIST_DIR}/levmar-2.3)
 
-if(ALLOW_BUNDLED_LEVMAR AND EXISTS "${LEVMAR_DIR}/lm.h")
+if(ALLOW_SYSTEM_LEVMAR AND TARGET Levmar::Levmar)
+	message(STATUS "- levmar - using system-provided library")
+	add_library(external-levmar INTERFACE)
+	target_link_libraries(external-levmar INTERFACE Levmar::Levmar)
+elseif(ALLOW_BUNDLED_LEVMAR AND EXISTS "${LEVMAR_DIR}/lm.h")
 	message(STATUS "- levmar - using bundled source")
 	add_library(
 		external-levmar STATIC
diff -up meshlab-Meshlab-2021.07/src/meshlabplugins/edit_mutualcorrs/levmarmethods.h.system-levmar meshlab-Meshlab-2021.07/src/meshlabplugins/edit_mutualcorrs/levmarmethods.h
--- meshlab-Meshlab-2021.07/src/meshlabplugins/edit_mutualcorrs/levmarmethods.h.system-levmar	2021-09-20 14:18:42.551273621 -0400
+++ meshlab-Meshlab-2021.07/src/meshlabplugins/edit_mutualcorrs/levmarmethods.h	2021-09-20 14:18:42.552273626 -0400
@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
 
 #include <list>
 
-#include "lm.h"
+#include "levmar.h"
 
 
 struct LevmarCorrelation {
diff -up meshlab-Meshlab-2021.07/src/meshlabplugins/edit_mutualcorrs/solver.h.system-levmar meshlab-Meshlab-2021.07/src/meshlabplugins/edit_mutualcorrs/solver.h
--- meshlab-Meshlab-2021.07/src/meshlabplugins/edit_mutualcorrs/solver.h.system-levmar	2021-09-20 14:18:42.553273632 -0400
+++ meshlab-Meshlab-2021.07/src/meshlabplugins/edit_mutualcorrs/solver.h	2021-09-20 14:18:42.554273637 -0400
@@ -5,7 +5,7 @@
 #include "alignset.h"
 
 #include "parameters.h"
-#include "lm.h"
+#include "levmar.h"
 
 #include <iostream>
 #include <fstream>
diff -up meshlab-Meshlab-2021.07/src/meshlabplugins/filter_isoparametrization/param_collapse.h.system-levmar meshlab-Meshlab-2021.07/src/meshlabplugins/filter_isoparametrization/param_collapse.h
--- meshlab-Meshlab-2021.07/src/meshlabplugins/filter_isoparametrization/param_collapse.h.system-levmar	2021-09-20 14:18:42.556273648 -0400
+++ meshlab-Meshlab-2021.07/src/meshlabplugins/filter_isoparametrization/param_collapse.h	2021-09-20 14:18:42.557273653 -0400
@@ -14,7 +14,7 @@
 
 #include <local_parametrization.h>
 #include <mesh_operators.h>
-#include <lm.h>
+#include <levmar.h>
 #include <uv_grid.h>
 
 #include "opt_patch.h"
diff -up meshlab-Meshlab-2021.07/src/meshlabplugins/filter_isoparametrization/parametrizator.h.system-levmar meshlab-Meshlab-2021.07/src/meshlabplugins/filter_isoparametrization/parametrizator.h
--- meshlab-Meshlab-2021.07/src/meshlabplugins/filter_isoparametrization/parametrizator.h.system-levmar	2021-09-20 14:18:42.558273659 -0400
+++ meshlab-Meshlab-2021.07/src/meshlabplugins/filter_isoparametrization/parametrizator.h	2021-09-20 14:18:42.559273664 -0400
@@ -32,7 +32,7 @@
 #include <vcg/space/color4.h>
 #include <dual_coord_optimization.h>
 #include <float.h>
-#include <lm.h>
+#include <levmar.h>
 #ifndef _MESHLAB
 #include <wrap/io_trimesh/export_ply.h>
 #endif
diff -up meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualglobal/levmarmethods.h.system-levmar meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualglobal/levmarmethods.h
--- meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualglobal/levmarmethods.h.system-levmar	2021-09-20 14:18:42.561273675 -0400
+++ meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualglobal/levmarmethods.h	2021-09-20 14:18:42.562273681 -0400
@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
 
 #include <list>
 
-#include "lm.h"
+#include "levmar.h"
 
 
 struct LevmarCorrelation {
diff -up meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualglobal/solver.h.system-levmar meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualglobal/solver.h
--- meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualglobal/solver.h.system-levmar	2021-09-20 14:18:42.563273686 -0400
+++ meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualglobal/solver.h	2021-09-20 14:18:42.564273692 -0400
@@ -5,7 +5,7 @@
 #include "alignset.h"
 
 #include "parameters.h"
-#include "lm.h"
+#include "levmar.h"
 
 #include <iostream>
 #include <fstream>
diff -up meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualinfo/levmarmethods.h.system-levmar meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualinfo/levmarmethods.h
--- meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualinfo/levmarmethods.h.system-levmar	2021-09-20 14:18:42.565273697 -0400
+++ meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualinfo/levmarmethods.h	2021-09-20 14:18:42.567273708 -0400
@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
 
 #include <list>
 
-#include "lm.h"
+#include "levmar.h"
 
 
 struct LevmarCorrelation {
diff -up meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualinfo/solver.h.system-levmar meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualinfo/solver.h
--- meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualinfo/solver.h.system-levmar	2021-09-20 14:18:42.568273713 -0400
+++ meshlab-Meshlab-2021.07/src/meshlabplugins/filter_mutualinfo/solver.h	2021-09-20 14:18:42.569273719 -0400
@@ -5,7 +5,7 @@
 #include "alignset.h"
 
 #include "parameters.h"
-#include "lm.h"
+#include "levmar.h"
 
 #include <iostream>
 #include <fstream>
diff -up meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_curvature_from_sliding/curvature_from_sliding.h.system-levmar meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_curvature_from_sliding/curvature_from_sliding.h
--- meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_curvature_from_sliding/curvature_from_sliding.h.system-levmar	2021-09-20 14:19:06.535404245 -0400
+++ meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_curvature_from_sliding/curvature_from_sliding.h	2021-09-20 14:19:16.221457002 -0400
@@ -30,7 +30,7 @@
 #include <vcg/complex/allocate.h>
 #include <vcg/complex/algorithms/subset.h>
 #include <vcg/space/index/grid_static_ptr.h>
-#include <lib/levmar/lm.h>
+#include <levmar.h>
 
 #include "frame.h"
 
diff -up meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo/levmarmethods.h.system-levmar meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo/levmarmethods.h
--- meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo/levmarmethods.h.system-levmar	2021-09-20 14:19:29.764530765 -0400
+++ meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo/levmarmethods.h	2021-09-20 14:19:43.397605022 -0400
@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
 
 #include <list>
 
-#include "../../external/levmar-2.3/lm.h"
+#include <levmar.h>
 
 
 struct LevmarCorrelation {
diff -up meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo/solver.h.system-levmar meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo/solver.h
--- meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo/solver.h.system-levmar	2021-09-20 14:19:54.188663798 -0400
+++ meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo/solver.h	2021-09-20 14:20:05.912727659 -0400
@@ -5,7 +5,7 @@
 #include "alignset.h"
 
 #include "parameters.h"
-#include "../../external/levmar-2.3/lm.h"
+#include <levmar.h>
 
 #include <iostream>
 #include <fstream>
diff -up meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo_xml/levmarmethods.h.system-levmar meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo_xml/levmarmethods.h
--- meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo_xml/levmarmethods.h.system-levmar	2021-09-20 14:20:17.190778446 -0400
+++ meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo_xml/levmarmethods.h	2021-09-20 14:20:27.852822822 -0400
@@ -12,7 +12,7 @@ sufficient to get a calibrated shot.<br>
 
 #include <list>
 
-#include "lm.h"
+#include "levmar.h"
 
 
 struct LevmarCorrelation {
diff -up meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo_xml/solver.h.system-levmar meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo_xml/solver.h
--- meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo_xml/solver.h.system-levmar	2021-09-20 14:20:38.856868621 -0400
+++ meshlab-Meshlab-2021.07/unsupported/plugins_unsupported/filter_mutualinfo_xml/solver.h	2021-09-20 14:20:47.005902538 -0400
@@ -5,7 +5,7 @@
 #include "alignset.h"
 
 #include "parameters.h"
-#include "lm.h"
+#include "levmar.h"
 
 #include <iostream>
 #include <fstream>
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin