My first subject line was "Who decided to break FindITK.cmake in
2.8.4?" but that isn't probably very tactful.

We have a whole bunch of projects that used to configure and build
just fine with CMake 2.8.3. With 2.8.4 they fail.

The error message we get is:

CMake Error at /opt/cmake-2.8.4-Darwin-universal/CMake
2.8-4.app/Contents/share/cmake-2.8/Modules/FindITK.cmake:52 (MESSAGE):
  Please set ITK_DIR to the directory containing ITKConfig.cmake.  This is
  either the root of the build tree, or PREFIX/lib/InsightToolkit for an
  installation.
Call Stack (most recent call first):
  BuildScripts/CMakeCommonExternalDefinitions.cmake:23 (find_package)
  CMakeLists.txt:70 (PACKAGE_NEEDS_ITK)

We DO set ITK_DIR at configure time, and I HAVE verified that
ITKConfig.cmake DOES exist in ${ITK_DIR}.

Looking at the difference between FindITK.cmake in 2.8.3 and 2.8.4 it
looks like someone replaced trusting the ITK_DIR variable and using it
directly if defined, with

FIND_PACKAGE(ITK QUIET NO_MODULE
NAMES ITK InsightToolkit CONFIGS ITKConfig.cmake)

Which doesn't work -- it appears to ignore ITK_DIR and doggedly insist
that it can't find ITK.

What gives?
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to