Actually, make install calls cmake in command mode to process cmake_install.cmake file in binary dir. You can move your doxy into separate component, and call cmake to process installation of particular component. Something like:<br>
<br> INSTALL(DIRECTORY html/<br>
DESTINATION /share/doc/${PROJECT_NAME}<br> COMPONENT=doxy)<br>
<br> ADD_CUSTOM_TARGET(installdoxy<br>
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake_install.cmake -DCMAKE_INSTALL_COMPONENT="doxy" VERBATIM )<br>
<br>Or you can:<br>1) escape dollar sign to prevent macro expansion at cmake time (but this is unportable)<br>2) wrap this call to cmake in separate cmake script (use execute_process instead), and call it with cmake -P command. This way, environment expansion will be done during sub-script processing time, that is when you make your target.<br>
<br><div class="gmail_quote">On Thu, Jan 15, 2009 at 12:08 AM, M G Berberich <span dir="ltr"><<a href="mailto:berberic@fmi.uni-passau.de">berberic@fmi.uni-passau.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I want to have a target 'installdoxy' that essentially does<br>
<br>
INSTALL(DIRECTORY html/<br>
DESTINATION /share/doc/${PROJECT_NAME})<br>
<br>
when I call 'make DESTDIR=… installdoxy'. The above code, of course,<br>
does not work, because it installs during 'make install'<br>
<br>
Defining a custom target via<br>
<br>
ADD_CUSTOM_TARGET(installdoxy<br>
COMMAND ${CMAKE_COMMAND} -E copy_directory html<br>
${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME} VERBATIM )<br>
<br>
does not work either because the DESTDIR=…-magic seems to only work in<br>
'make DESTDIR=… install' not in 'make DESTDIR=… installdoxy'. Using<br>
<br>
$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}<br>
<br>
does not work either, because '$ENV{DESTDIR}' is expanded while cmake<br>
runs, not while make does.<br>
<br>
So, any chance to define a custom install target that is usable with<br>
DESTDIR?<br>
<br>
MfG<br>
bmg<br>
<font color="#888888"><br>
--<br>
„Des is völlig wurscht, was heut beschlos- | M G Berberich<br>
sen wird: I bin sowieso dagegn!" | <a href="mailto:berberic@fmi.uni-passau.de">berberic@fmi.uni-passau.de</a><br>
(SPD-Stadtrat Kurt Schindler; Regensburg) | <a href="http://www.fmi.uni-passau.de/%7Eberberic" target="_blank">www.fmi.uni-passau.de/~berberic</a><br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a></font></blockquote></div><br>