From e6caf52f64d5a6347913a0d75c68edf63a66a302 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 1 Sep 2021 17:04:55 +0200 Subject: [PATCH] vtk_9: do not vendor libpng and libtiff Previously ldd did not show the dependencies so presumably, VTK 9 started linking them statically after build system changes, as hinted by the following CMake warning: Manually-specified variables were not used by the project: VTK_USE_SYSTEM_PNG VTK_USE_SYSTEM_TIFF --- pkgs/development/libraries/vtk/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index fb2b11511b99..a3d3824a5410 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -67,8 +67,8 @@ in stdenv.mkDerivation rec { cmakeFlags = [ "-DCMAKE_C_FLAGS=-fPIC" "-DCMAKE_CXX_FLAGS=-fPIC" - "-DVTK_USE_SYSTEM_PNG=ON" - "-DVTK_USE_SYSTEM_TIFF=1" + "-D${if lib.versionOlder version "9.0" then "VTK_USE_SYSTEM_PNG" else "VTK_MODULE_USE_EXTERNAL_vtkpng"}=ON" + "-D${if lib.versionOlder version "9.0" then "VTK_USE_SYSTEM_TIFF" else "VTK_MODULE_USE_EXTERNAL_vtktiff"}=1" "-DOPENGL_INCLUDE_DIR=${libGL}/include" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_INCLUDEDIR=include"