# HG changeset patch # User Sebastien Jodogne # Date 1380896320 -7200 # Node ID f9991e8e66bff5c1aa3d642d89177d95ce7f55ad # Parent ee61f769a25dbe087e9592bbb4c9f7566d390505 fix build of doc diff -r ee61f769a25d -r f9991e8e66bf CMakeLists.txt --- a/CMakeLists.txt Fri Oct 04 15:40:27 2013 +0200 +++ b/CMakeLists.txt Fri Oct 04 16:18:40 2013 +0200 @@ -361,23 +361,30 @@ ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen @ONLY) - configure_file( - ${CMAKE_SOURCE_DIR}/Resources/OrthancClient.doxygen - ${CMAKE_CURRENT_BINARY_DIR}/OrthancClient.doxygen - @ONLY) - add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Orthanc.doxygen - COMMAND - ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancClient.doxygen WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating client documentation with Doxygen" VERBATIM + COMMENT "Generating internal documentation with Doxygen" VERBATIM ) - install( - DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancClientDocumentation/doc/ - DESTINATION share/doc/orthanc/OrthancClient - ) + if (BUILD_CLIENT_LIBRARY) + configure_file( + ${CMAKE_SOURCE_DIR}/Resources/OrthancClient.doxygen + ${CMAKE_CURRENT_BINARY_DIR}/OrthancClient.doxygen + @ONLY) + + add_custom_command(TARGET OrthancClient + POST_BUILD + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancClient.doxygen + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating client documentation with Doxygen" VERBATIM + ) + + install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/OrthancClientDocumentation/doc/ + DESTINATION share/doc/orthanc/OrthancClient + ) + endif() else() message("Doxygen not found. The documentation will not be built.")