VTKConfigVersion does NOT complain "appropriately" if a VTK_DIR containing a different version is passed
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Using the example below, we can see that a project expecting VTK 6 can not be built against VTK 6.1:
//--------------------- cmake_minimum_required(VERSION 2.8.12) find_package(VTK 6 REQUIRED) //---------------------
cmake -DVTK_DIR:PATH=/path/to/VTKv6-build # Contain build of VTK 6.1
The message returned is:
// -------------------------- $ ~/Support/cmake-3.0.0/bin/cmake -DVTK_DIR:PATH=/home/jchris/Projects/VTKv6-build/ ../ -- The C compiler identification is GNU 4.8.1 -- The CXX compiler identification is GNU 4.8.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at /home/jchris/Support/cmake-3.0.0-rc6/Modules/FindVTK.cmake:150 (message): VTK not found. Set the VTK_DIR cmake cache entry to the directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation. Call Stack (most recent call first): CMakeLists.txt:2 (find_package)
-- Configuring incomplete, errors occurred! See also "/home/jchris/Projects/sandbox/test-find-vtk6/build/CMakeFiles/CMakeOutput.log". // --------------------------