On 11/27/2010 09:39 AM, Kai Wasserbäch wrote: > tag 600889 + upstream patch > thanks > > Hello Michael, > I've investigated the problem further and it seems like FindVTK.cmake is > missing > a case for handling the VTK 5.x case. I've prepared a patch (applies on top of > FindVTK.cmake), which I've attached to this message. It needs probably some > more > thorough testing from somebody using VTK. So please try it with CMake 2.8.3 > (alternatively you can just use the FindPackageHandleStandardArgs.cmake file > from 2.8.3).
As I commented in the CMake bug report: http://www.cmake.org/Bug/view.php?id=11678#c24561 this change to FindVTK.cmake is incorrect. The entire block of code around it is specifically looking for VTK 4.0 and nothing more recent. It starts with: # Special search for VTK 4.0. and the case reported in the bug is intentionally commented as # We found the wrong version. Pretend we did not find it. By "wrong version" it means "not 4.0". The *real* search takes place before that entire block begins: # Use the Config mode of the find_package() command to find VTKConfig. # If this succeeds (possibly because VTK_DIR is already set), the # command will have already loaded VTKConfig.cmake and set VTK_FOUND. IF(NOT _VTK_40_ONLY AND NOT VTK_FOUND) FIND_PACKAGE(VTK QUIET NO_MODULE) ENDIF() and is actually implemented in C++ in the find_package() command. This is actually a VTK issue. It does not provide a package version file (VTKConfigVersion.cmake) file next to its package configuration file (VTKConfig.cmake). Therefore it does not support versioned finds as documented by the find_package command: http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package "When the [version] argument is given Config mode will only find a version of the package that claims compatibility with the requested version" Debian can fix this for its VTK packages by adding such a file. A tutorial is here: http://www.cmake.org/Wiki/CMake_2.6_Notes#Package_Version_Files The issue should be filed with VTK upstream too. -Brad -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

