[CMake] Undocumented FILE(INSTALL ...

Andy Lego andy at legoandy.com
Tue Oct 14 17:32:06 EDT 2008


Hi Eric,

The FILE(INSTALL command is an internal command used for install process. If
there is a DESTDIR problem, then it is in the original CMake files that
generate that file.

Andy

On Tue, Oct 14, 2008 at 2:18 PM, Eric Noulard <eric.noulard at gmail.com>wrote:

> Hi All,
>
> I am using
>
> CONFIGURE_FILE(doc_install.in doc_install.cmake @ONLY)
> INSTALL(SCRIPT ${CMAKE_BINARY_DIR}/doc_install.cmake COMPONENT DOC)
>
> The doc_install.cmake contains CMake commands used to copy
> the result of Doxygen outputs (1 dir and 1 file)
>
> I discovered that my doc_install.cmake was broken when trying
> to build RPM or DEB package.
>
> because... the script did not handle DESTDIR.
>
> So I did have look at some CMake generated
> cmake_install.cmake for a target and saw:
>
> FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE
> FILES "/my/build/tree/myapp")
>
> so nice I did
>
> cmake --help-command file
>
> and there is NO  "INSTALL" for the FILE command?
> is the doc missing?
> do I miss something myself?
>
> In the end I manage to handle DESTDIR  another way inside doc_install.inwith:
>
> EXECUTE_PROCESS(COMMAND @CMAKE_COMMAND@ -E copy
> @DoxyTools_OUTPUT_DIR@/latex/refman.pdf
> $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/doc/certi/@DOCSET@
> /CERTI_ at DOCSET@.pdf)
>
> But I still wonder if the undocumented FILE(INSTALL wouldn't be a
> better solution.
>
> --
> Erk
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Lets bike the world together
http://legoandy.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081014/f1ed4e43/attachment.htm>


More information about the CMake mailing list