Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Find for javadoc.
[simgrid.git] / GenerateDoc.cmake
index 6186acb..c8686a8 100644 (file)
@@ -1,7 +1,8 @@
 #### Generate the html documentation
 find_path(DOXYGEN_PATH NAMES doxygen   PATHS NO_DEFAULT_PATHS)
 #### Generate the html documentation
 find_path(DOXYGEN_PATH NAMES doxygen   PATHS NO_DEFAULT_PATHS)
+find_path(JAVADOC_PATH  NAMES javadoc   PATHS NO_DEFAULT_PATHS)
 
 
-if(DOXYGEN_PATH)
+if(DOXYGEN_PATH AND JAVADOC_PATH)
        
        configure_file(${CMAKE_HOME_DIRECTORY}/doc/Doxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/Doxyfile @ONLY)
        configure_file(${CMAKE_HOME_DIRECTORY}/doc/footer.html.in ${CMAKE_HOME_DIRECTORY}/doc/footer.html @ONLY)                
        
        configure_file(${CMAKE_HOME_DIRECTORY}/doc/Doxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/Doxyfile @ONLY)
        configure_file(${CMAKE_HOME_DIRECTORY}/doc/footer.html.in ${CMAKE_HOME_DIRECTORY}/doc/footer.html @ONLY)                
@@ -18,19 +19,20 @@ if(DOXYGEN_PATH)
                COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile
                
         COMMAND ${CMAKE_COMMAND} -E echo "XX Javadoc pass"
                COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile
                
         COMMAND ${CMAKE_COMMAND} -E echo "XX Javadoc pass"
-        COMMAND javadoc -d ${CMAKE_HOME_DIRECTORY}/doc/html/javadoc/ ${CMAKE_HOME_DIRECTORY}/org/simgrid/msg/*.java
+        COMMAND ${JAVADOC_PATH}/javadoc -d ${CMAKE_HOME_DIRECTORY}/doc/html/javadoc/ ${CMAKE_HOME_DIRECTORY}/org/simgrid/msg/*.java
                
                WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/
        )
        
                
                WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/
        )
        
-else(DOXYGEN_PATH)
+else(DOXYGEN_PATH AND JAVADOC_PATH)
        ADD_CUSTOM_TARGET(documentation
                        COMMENT "Generating the SimGrid documentation..."
                        )
 
        ADD_CUSTOM_COMMAND(TARGET documentation
                        COMMAND ${CMAKE_COMMAND} -E echo "DOXYGEN_PATH          = ${DOXYGEN_PATH}"
        ADD_CUSTOM_TARGET(documentation
                        COMMENT "Generating the SimGrid documentation..."
                        )
 
        ADD_CUSTOM_COMMAND(TARGET documentation
                        COMMAND ${CMAKE_COMMAND} -E echo "DOXYGEN_PATH          = ${DOXYGEN_PATH}"
+                       COMMAND ${CMAKE_COMMAND} -E echo "JAVADOC_PATH      = ${JAVADOC_PATH}"
                        COMMAND ${CMAKE_COMMAND} -E echo "FAIL TO MAKE SIMGRID DOCUMENTATION see previous messages for details ..."
                        COMMAND false
                        )       
                        COMMAND ${CMAKE_COMMAND} -E echo "FAIL TO MAKE SIMGRID DOCUMENTATION see previous messages for details ..."
                        COMMAND false
                        )       
-endif(DOXYGEN_PATH)
+endif(DOXYGEN_PATH AND JAVADOC_PATH)