vcg: switch to CMake

This commit is contained in:
Guilhem Saurel
2025-10-28 19:54:36 +01:00
parent edbfc2a1bd
commit 5332e5d3b5
+26 -6
View File
@@ -3,6 +3,10 @@
stdenv,
fetchFromGitHub,
fetchpatch,
# nativeBuildInputs
cmake,
# propagatedBuildInputs
eigen,
@@ -19,13 +23,29 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-OZnqFnHGXC9fS7JCLTiHNCeA//JBAZGLB5SP/rGzaA8=";
};
propagatedBuildInputs = [ eigen ];
patches = [
# CMake: install lib and exports
# ref. https://github.com/cnr-isti-vclab/vcglib/pull/248
# merged upstream
(fetchpatch {
name = "cmake-install-lib-and-exports.patch";
url = "https://github.com/cnr-isti-vclab/vcglib/commit/4a8dd8d6e54890aee76917d27aabfa7031cbc68d.patch";
hash = "sha256-b3qsmLu+4VSs943VS3C4gdG/PDR2mhr9/dDTmkep8zo=";
})
];
installPhase = ''
mkdir -p $out/include
cp -r vcg wrap $out/include
find $out -name \*.h -exec sed -i 's,<eigenlib/,<eigen3/,g' {} \;
'';
nativeBuildInputs = [
cmake
];
propagatedBuildInputs = [
eigen
];
cmakeFlags = [
(lib.cmakeBool "VCG_ALLOW_BUNDLED_EIGEN" false)
(lib.cmakeBool "VCG_BUILD_EXAMPLES" false)
];
meta = {
homepage = "https://vcg.isti.cnr.it/vcglib/install.html";