[CMake] Re: INSTALL DIRECTORY broken
Thomas Sondergaard
ts_news1 at sondergaard.cc
Fri Nov 2 10:48:00 EDT 2007
I took a look at the cmake source and I think perhaps this is a bug. The
FILES mode checks that the specified files are not directories, and I
think maybe the DIRECTORY mode simply wants to check that the specified
paths are not regular files?
--- t/cmake-2.4.7/Source/cmInstallCommand.cxx 2007-07-16
23:12:31.000000000 +0200
+++ cmake-2.4.7/Source/cmInstallCommand.cxx 2007-11-02
15:44:53.000000000 +0100
@@ -958,7 +958,8 @@
}
// Make sure the name is a directory.
- if(!cmSystemTools::FileIsDirectory(dir.c_str()))
+ if(cmSystemTools::FileExists(dir.c_str()) &&
+ !cmSystemTools::FileIsDirectory(dir.c_str()))
{
cmOStringStream e;
e << args[0] << " given non-directory \""
Regards,
Thomas
Thomas Sondergaard wrote:
> 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