[CMake] Question about INSTALL_TARGETS error

kdsfinger at gmail.com kdsfinger at gmail.com
Tue Jun 13 01:58:13 EDT 2006


hi, all

I am using GUISupport/Qt come with the vtk5.0 and try to compile with
cmake but get the following error message:

CMake Error: Error in cmake code at
 /home/me/vtk/VTK/GUISupport/Qt/CMakeLists.txt:183:
 INSTALL_TARGETS called with incorrect number of arguments

The CMakeLists.txt with the error line is

IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
  INSTALL_FILES( ${VTK_INSTALL_INCLUDE_DIR} .h ${QVTKLibSrcs})
  INSTALL_FILES( ${VTK_INSTALL_PACKAGE_DIR} FILES
${VTK_BINARY_DIR}/VTKConfigQt.cmake )
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
  INSTALL_TARGETS( ${VTK_INSTALL_LIB_DIR} QVTK ) # !!! Line 183, error here!!!
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)

I checked the cmake manue and found

#  INSTALL_TARGETS: Create install rules for targets.

  INSTALL_TARGETS(<dir> [RUNTIME_DIRECTORY dir] target target)

Create rules to install the listed targets into the given directory.
The directory <dir> is relative to the installation prefix, which is
stored in the variable CMAKE_INSTALL_PREFIX. If RUNTIME_DIRECTORY is
specified, then on systems with special runtime files (Windows DLL),
the files will be copied to that directory.

However, I am not quite understand how to use the INSTALL_TARGETS (why
there are 2 target?). In my case, how may I correct the mistake?
Thanks ahead.

zl2k.


More information about the CMake mailing list