[Insight-developers] CMake 1.4 error

Ken Martin ken . martin at kitware . com
Thu, 1 Aug 2002 16:11:28 -0400


> I'm getting an odd error with CMake 1.4 patch 1 (under
> Windows). It says:
>
> CMake Error: LINK_DIRECTORIES: Error: LINK_DIRECTORIES called with
> incorrect number of arguments from CMakeLists.txt file in directory:
> e:/chimera
>
> As far as I can tell, we never use the LINK_DIRECTORIES
> command in the
> CMakeLists.txt file. We do use FindITK.cmake, FindVTK.cmake,
> FindFLTK.cmake, FindOpenGL.cmake, and FindGLU.cmake plus
> the other usual
> stuff like INCLUDE_DIRECTORIES and so forth.
>
> Our CMakeLists.txt file worked fine with earlier (1.3 and
> 1.2) versions of
> CMake.

Hello,

The Find*.cmake code in CMake does not do a LINK_DIRECTORIES command
so that isn't it. But UseVTK.cmake and UseITK.cmake do make use of
LINK_DIRECTORIES. My guess is that your CMakeList file INCLUDEs some
other files such as UseITK.cmake and have built either VTK or ITK with
the [I or V]TK_LIBRARY_PATH set to nothing. I have checked in a fix
for CMake that handles LINK_DIRECTORIES with no arguments but it will
not show up for a day or two. If you can, take a look and see if that
is the issue.

Thanks
Ken