[CMake] Undocumented FILE(INSTALL ...

Eric NOULARD eric.noulard at gmail.com
Tue Oct 14 17:41:36 EDT 2008


Le Tue, 14 Oct 2008 14:32:06 -0700,
"Andy Lego" <andy at legoandy.com> a écrit :

> Hi Eric,
> 
> The FILE(INSTALL command is an internal command used for install
> process. 

It seems to have good property regarding DESTDIR handling,
so I was wanting to use it :=)

> If there is a DESTDIR problem, then it is in the original
> CMake files that generate that file.

Nope not really, the file generating the problem is mine.
It is a CMake script which is generated by MY own build system
using CMake:
CONFIGURE_FILE(doc_install.in doc_install.cmake @ONLY)

Then this script is used in:
INSTALL(SCRIPT ${CMAKE_BINARY_DIR}/doc_install.cmake  COMPONENT DOC)

I need an INSTALL(SCRIPT because I want to install files which
are generated (by Doxygen) during BUILD time and not at CMake time.
Moreover I cannot even predict how many files I will have to install
because I don't know how many files Doxygen will generate.
Thus my "doc_install.cmake" script do copy a directory in the buildtree
into ${CMAKE_INSTALL_PREFIX}/share/doc.

So the custom made "doc_install.cmake" needs to handle DESTDIR
properly and I thought I may try to do the same thing as the
CMake generated cmake_install.cmake scripts, thus my question.

-- 
Erk


More information about the CMake mailing list