Hy guys.<br><br>I&#39;m using doxygen to generate my documentation and i would like to add a cmake target.<br>I&#39;ve read the tutorial from: <a href="http://www.elpauer.org/stuff/learning_cmake.pdf">http://www.elpauer.org/stuff/learning_cmake.pdf</a>, however this toturial doesn&#39;t deal with doygen path configuration through cmake.<br>

<br>In doxygen you can use environment variable to configure your system file.<br>Important variables in my Doxygen.in look like this:<br><br>STRIP_FROM_PATH = $(DOX_STRIP_FROM_PATH)<br>OUTPUT_DIRECTORY = $(OUTPUT_DIRECTORY)<br>

INPUT = $(INPUT)<br>EXAMPLE_PATH = $(DOX_EXAMPLE_PATH)<br>IMAGE_PATH=$(DOX_IMAGE_PATH)<br><br>Then I call, in the macro <br><br>MACRO(GENERATE_DOCUMENTATION DOXYGEN_CONFIG_FILE) <br><br>....<br><br>SET(ENV{DOX_STRIP_FROM_PATH} &quot;${PROJECT_SOURCE_DIR}&quot; )   <br>

SET(ENV{DOX_OUTPUT_DIRECTORY} docs)<br>SET(ENV{DOX_INPUT}  &quot;${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/include/&quot;)<br clear="all">SET(ENV{DOX_OUTPUT_DIRECTORY} docs/images)<br><br>ADD_CUSTOM_TARGET( doc ALL &quot;${DOXYGEN_EXECUTABLE}&quot;  &quot;${PROJECT_SOURCE_DIR}/${DOXYGEN_CONFIG_FILE}&quot;)<br>

<br>.....<br><br>But this doesn&#39;t work... it seems that environment variable are not set at execution of the doxygen file. <br><br>-----------------------------<br><br>Looking at the message <a href="http://www.cmake.org/pipermail/cmake/2009-March/028199.html">http://www.cmake.org/pipermail/cmake/2009-March/028199.html</a>, I&#39;ve try to generate a script at run time.<br>

the &quot;runcommand.cmake&quot; script look like this: <br><br>## Add environment<br>SET(ENV{DOX_STRIP_FROM_PATH} &quot;D:/projects/CvS400/trunk&quot; )  <br>SET(ENV{DOX_OUTPUT_DIRECTORY} docs)<br>SET(ENV{DOX_INPUT}  &quot;D:/projects/CvS400/trunk/src D:/projects/CvS400/trunk/include/&quot;)<br>

SET(ENV{DOX_OUTPUT_DIRECTORY} docs/images)<br>...<br><br>## execute process with ARGS.<br>execute_process(COMMAND &quot;C:/Archivos de programa/doxygen/bin/doxygen.exe&quot;  &quot;D:/projects/CvS400/trunk/doc/Doxyfile.in&quot;)<br>

<br>but when i call it I have this error:<br>D:\projects\CvS400\build&gt;&quot;C:\Archivos de programa\CMake 2.6\bin\cmake.exe&quot; -E time runcommand.cmake<br>%1 no es una aplicación Win32 válida<br><br>-----------------------------<br>

<br>If someone know a good way to perform this operation it would be very happy.<br><br>--<br>Benoit RAT<br><a href="http://www.neub.co.nr">www.neub.co.nr</a><br>