[CMake] custom_install-target with DESTDIR
M G Berberich
berberic at fmi.uni-passau.de
Wed Jan 14 16:08:31 EST 2009
Hello,
I want to have a target ‘installdoxy’ that essentially does
INSTALL(DIRECTORY html/
DESTINATION /share/doc/${PROJECT_NAME})
when I call ‘make DESTDIR=… installdoxy’. The above code, of course,
does not work, because it installs during ‘make install’
Defining a custom target via
ADD_CUSTOM_TARGET(installdoxy
COMMAND ${CMAKE_COMMAND} -E copy_directory html
${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME} VERBATIM )
does not work either because the DESTDIR=…-magic seems to only work in
‘make DESTDIR=… install’ not in ‘make DESTDIR=… installdoxy’. Using
$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}
does not work either, because ‘$ENV{DESTDIR}’ is expanded while cmake
runs, not while make does.
So, any chance to define a custom install target that is usable with
DESTDIR?
MfG
bmg
--
„Des is völlig wurscht, was heut beschlos- | M G Berberich
sen wird: I bin sowieso dagegn!“ | berberic at fmi.uni-passau.de
(SPD-Stadtrat Kurt Schindler; Regensburg) | www.fmi.uni-passau.de/~berberic
More information about the CMake
mailing list