[CMake] INSTALL DIRECTORY broken

Thomas Sondergaard ts_news1 at sondergaard.cc
Fri Nov 2 09:33:09 EDT 2007


Well, probably not - it's just not doing what I want :-)

I'm using doxygen and want to install the documentation (to make a 
package-doc rpm package). My doc/CMakeLists.txt looks like this:

ADD_CUSTOM_COMMAND(OUTPUT api/index.html COMMAND doxygen Doxyfile)
ADD_CUSTOM_TARGET(doc DEPENDS api/index.html)

INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api DESTINATION 
share/doc/MyPackage/)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man DESTINATION share)

The problem is that I will get an error from cmake (not make!):

/u/ts/evz/evbase/doc/CMakeLists.txt:9:
INSTALL DIRECTORY given non-directory "/u/ts/evz/evbase/build/doc/api" 
to install.

Obviously the api directory doesn't exist yet, it will be made when I 
run 'make doc'.

The INSTALL FILES signature doesn't suffer from the same problem.

Regards,

Thomas



More information about the CMake mailing list