浏览代码

ctkFunctionGenerateProjectXml considers 'Documentation' label

The dependency graph will show that the target Documentation depends
on all the CTK libraries, plugins and applications.
Jean-Christophe Fillion-Robin 14 年之前
父节点
当前提交
16d45b6d6c
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      CMake/ctkFunctionGenerateProjectXml.cmake

+ 10 - 1
CMake/ctkFunctionGenerateProjectXml.cmake

@@ -33,6 +33,8 @@ FUNCTION(ctkFunctionGenerateProjectXml dir name target_directories is_superbuild
     SET(xml_subprojects ${xml_subprojects} "  <SubProject name=\"SuperBuild\">\n")
   ENDIF()
   
+  SET(subproject_list)
+  
   FOREACH(target_info ${target_directories})
 
     # extract target_dir and option_name
@@ -64,7 +66,8 @@ FUNCTION(ctkFunctionGenerateProjectXml dir name target_directories is_superbuild
       #MESSAGE(STATUS target_project_name:${target_project_name})
       
       SET(xml_subprojects ${xml_subprojects} "  <SubProject name=\"${target_project_name}\">\n")
-
+      LIST(APPEND subproject_list ${target_project_name})
+      
       # Make sure the variable is cleared
       SET(dependencies )
 
@@ -89,6 +92,12 @@ FUNCTION(ctkFunctionGenerateProjectXml dir name target_directories is_superbuild
       SET(xml_subprojects ${xml_subprojects} "  </SubProject>\n")
     #ENDIF()
   ENDFOREACH()
+  
+  SET(xml_subprojects ${xml_subprojects} "  <SubProject name=\"Documentation\">\n")
+  FOREACH(subproject ${subproject_list})
+    SET(xml_subprojects ${xml_subprojects} "    <Dependency name=\"${subproject}\"/>\n")
+  ENDFOREACH()
+  SET(xml_subprojects ${xml_subprojects} "  </SubProject>\n")
    
   SET(xml_content "<Project name=\"${name}\">\n${xml_subprojects}</Project>")
   SET(filename "${dir}/Project.xml")