File openMVS.spec of Package openmvs

#
# spec file for package openmvs
#
# Copyright (c) 2024 Lorenz Hüdepohl
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

%define vcglib_version 2023.12

Name:           openMVS
Version:        2.2.0
Release:        0
Summary:        Open Multi-View Stereo reconstruction library
License:        AGPL-3.0
URL:            http://cdcseacave.github.io/
Source0:        https://github.com/cdcseacave/openMVS/archive/refs/tags/v%{version}.tar.gz
Source1:        https://github.com/cnr-isti-vclab/vcglib/archive/refs/tags/%{vcglib_version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  python3-devel
BuildRequires:  cgal-devel
BuildRequires:  cmake
BuildRequires:  eigen3-devel
BuildRequires:  opencv3-devel
BuildRequires:  libceres-devel
BuildRequires:  libboost_iostreams-devel >= 1.56.0
BuildRequires:  libboost_program_options-devel >= 1.56.0
BuildRequires:  libboost_system-devel >= 1.56.0
BuildRequires:  libboost_serialization-devel >= 1.56.0
BuildRequires:  libboost_python3-devel >= 1.56.0
BuildRequires:  libglfw-devel
BuildRequires:  libjpeg8-devel
BuildRequires:  libxml2-devel

%description
OpenMVS (Multi-View Stereo) is a library for computer-vision scientists and
especially targeted to the Multi-View Stereo reconstruction community. While
there are mature and complete open-source projects targeting
Structure-from-Motion pipelines (like OpenMVG) which recover camera poses and a
sparse 3D point-cloud from an input set of images, there are none addressing
the last part of the photogrammetry chain-flow. OpenMVS aims at filling that
gap by providing a complete set of algorithms to recover the full surface of
the scene to be reconstructed. The input is a set of camera poses plus the
sparse point-cloud and the output is a textured mesh.

%package devel
Summary:        Developent headers for %{name}
Group:          Development/Libraries/C and C++

%description devel
Development package for %{name}


%prep
%autosetup


%build
tar xvf %{SOURCE1}
export VCG_ROOT=$PWD/vcglib-%{vcglib_version}
%cmake \
	-DCMAKE_CXX_FLAGS:STRING="%optflags -Wno-error=return-type -ffat-lto-objects" \
	-DOpenMVS_USE_CUDA:BOOL=OFF \
	-DBUILD_SHARED_LIBS:BOOL=OFF \
	-DCMAKE_BUILD_TYPE=Release

%cmake_build

%install
%cmake_install

%files
%{_bindir}/OpenMVS
#{_libdir}/pyOpenMVS.so
%license LICENSE
%doc README.md

%files devel
%{_includedir}/OpenMVS
%{_prefix}/lib/cmake
%{_prefix}/lib/OpenMVS


%changelog
openSUSE Build Service is sponsored by