[CMake] [INSTALL] Add generated subdir to installation

Nikita V. Borodikhin nikita at pictures.uniqueics.com.ru
Mon Apr 30 10:59:19 EDT 2007


Hello, all!

I want to have a build/install process like this:
* 'all' builds all but documentation
* 'doxydoc' builds source code documentation via doxygen
* install installs both doxygened documentation and files built

So I need to add 'doxydoc' to dependencies of 'install' target:
  ADD_CUSTOM_TARGET (doxydoc
                     COMMAND ${DOXYGEN}
                     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
  ADD_DEPENDENCIES (INSTALL doxydoc)
but I've got an error:
  CMake Error: Error in cmake code at /.../CMakeLists.txt:234:
  ADD_DEPENDENCIES Adding dependency to non-existent target: INSTALL

After that I need to install a directory:
  INSTALL (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxydoc
           DESTINATION doc/doxygen)
But have an error again:
  CMake Error: Error in cmake code at /.../CMakeLists.txt:240:
  INSTALL DIRECTORY given non-directory "/.../doxydoc" to install.


CMake 2.4.5 (Debian).
Any thoughts?

Yours,
-- 
Nikita V. Borodikhin, NIKB-RIPN BNV7-RIPE
Registered Linux user #256562 with the Linux Counter
uniqueics.com.ru


More information about the CMake mailing list