2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake
|
2017-05-03 12:55:06 +00:00
|
|
|
, libjpeg ? null
|
|
|
|
, zlib ? null
|
|
|
|
, libpng ? null
|
|
|
|
, eigen ? null
|
|
|
|
, libtiff ? null
|
|
|
|
, enableExamples ? false
|
|
|
|
, enableDocs ? false }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-07 20:17:43 +00:00
|
|
|
version = "2.0";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "openmvg";
|
2017-05-03 12:55:06 +00:00
|
|
|
|
2020-04-15 21:00:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openmvg";
|
|
|
|
repo = "openmvg";
|
|
|
|
rev = "v${version}";
|
2021-12-07 20:17:43 +00:00
|
|
|
sha256 = "sha256-6F/xUgZpqY+v6CpwTBhIXI4JdT8HVB0P5JzOL66AVd8=";
|
2017-05-03 12:55:06 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libjpeg zlib libpng eigen libtiff ];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2017-05-03 12:55:06 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_CXX_FLAGS=-std=c++11"
|
|
|
|
"-DOpenMVG_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}"
|
|
|
|
"-DOpenMVG_BUILD_DOC=${if enableDocs then "ON" else "OFF"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeDir = "./src";
|
|
|
|
|
|
|
|
dontUseCmakeBuildDir = true;
|
|
|
|
|
|
|
|
# This can be enabled, but it will exhause virtual memory on most machines.
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
|
|
|
# Without hardeningDisable, certain flags are passed to the compile that break the build (primarily string format errors)
|
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
|
|
|
|
meta = {
|
2022-05-29 09:37:28 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64);
|
2017-05-03 12:55:06 +00:00
|
|
|
description = "A library for computer-vision scientists and targeted for the Multiple View Geometry community";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://openmvg.readthedocs.io/en/latest/";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.mpl20;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ mdaiter ];
|
2017-05-03 12:55:06 +00:00
|
|
|
};
|
|
|
|
}
|