Am 30. April 2015 14:04:08 MESZ, schrieb coo...@megaroms.co.uk:
>Hi,
>
>I'm using Doxygen to generate my project documentation and have a
>custom
>target to do it. Like this:
>
>find_package( Doxygen )
>
>if( DOXYGEN_FOUND )
>    configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
>${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY )
>
>    add_custom_target( doc
>                       ${DOXYGEN_EXECUTABLE}
>${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
>                       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
>                    COMMENT "Generating API documentation with Doxygen"
>VERBATIM
>                       SOURCES Doxyfile.in
>    )
>endif( DOXYGEN_FOUND )
>
>which works fine. However, I'd like to extend this so the generated
>index.html file is shown as part of the "doc" project when I use the
>Visual Studio generator. Is there a way to do this? If the file already
>exist I can coax CMake to include the file by adding it to SOURCES but
>when the file doesn't exist (most of the time) CMake gives an error.

Maybe the following works:
Make your doc custom target depend on the output file  index.html and run 
doxygen in that custom command.

HS



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to