qmake/generators/win32/msbuild_objectmodel.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
  2654                               << attrTag("Include",Option::fixPathToLocalOS(filename))
  2654                               << attrTag("Include",Option::fixPathToLocalOS(filename))
  2655                               << attrTagS("Filter", filtername);
  2655                               << attrTagS("Filter", filtername);
  2656 
  2656 
  2657                     xml << tag("ClCompile")
  2657                     xml << tag("ClCompile")
  2658                         << attrTag("Include",Option::fixPathToLocalOS(filename));
  2658                         << attrTag("Include",Option::fixPathToLocalOS(filename));
  2659                 } else {
  2659                 } else if(filename.endsWith(".res")) {
  2660 
  2660 
  2661                     xmlFilter << tag("CustomBuild")
  2661                     xmlFilter << tag("CustomBuild")
  2662                               << attrTag("Include",Option::fixPathToLocalOS(filename))
  2662                               << attrTag("Include",Option::fixPathToLocalOS(filename))
  2663                               << attrTagS("Filter", filtername);
  2663                               << attrTagS("Filter", filtername);
  2664 
  2664 
  2665                     xml << tag("CustomBuild")
  2665                     xml << tag("CustomBuild")
       
  2666                         << attrTag("Include",Option::fixPathToLocalOS(filename));
       
  2667                 } else {
       
  2668 
       
  2669                     xmlFilter << tag("CustomBuild")
       
  2670                               << attrTag("Include",Option::fixPathToLocalOS(filename))
       
  2671                               << attrTagS("Filter", filtername);
       
  2672 
       
  2673                     xml << tag("CustomBuild")
       
  2674                         << attrTag("Include",Option::fixPathToLocalOS(filename));
       
  2675                 }
       
  2676             } else if(filtername == "Root Files") {
       
  2677 
       
  2678                 if (filename.endsWith(".rc")) {
       
  2679 
       
  2680                     xmlFilter << tag("ResourceCompile")
       
  2681                               << attrTag("Include",Option::fixPathToLocalOS(filename));
       
  2682 
       
  2683                     xml << tag("ResourceCompile")
  2666                         << attrTag("Include",Option::fixPathToLocalOS(filename));
  2684                         << attrTag("Include",Option::fixPathToLocalOS(filename));
  2667                 }
  2685                 }
  2668             }
  2686             }
  2669         }
  2687         }
  2670 
  2688 
  2694 
  2712 
  2695                 xml << tag("PrecompiledHeader")
  2713                 xml << tag("PrecompiledHeader")
  2696                     << attrTag("Condition", QString("'$(Configuration)|$(Platform)'=='%1'").arg((*Config).Name))
  2714                     << attrTag("Condition", QString("'$(Configuration)|$(Platform)'=='%1'").arg((*Config).Name))
  2697                     << valueTag(CompilerTool.PrecompiledHeader);
  2715                     << valueTag(CompilerTool.PrecompiledHeader);
  2698             }
  2716             }
  2699 
       
  2700             //xml << CompilerTool;
       
  2701         }
  2717         }
  2702     }
  2718     }
  2703 
  2719 
  2704     return fileAdded;
  2720     return fileAdded;
  2705 }
  2721 }
  3021                           << attrTag("Include",Option::fixPathToLocalOS(info.file))
  3037                           << attrTag("Include",Option::fixPathToLocalOS(info.file))
  3022                           << attrTagS("Filter", filtername);
  3038                           << attrTagS("Filter", filtername);
  3023 
  3039 
  3024                 xml << tag("ClCompile")
  3040                 xml << tag("ClCompile")
  3025                     << attrTag("Include",Option::fixPathToLocalOS(info.file));
  3041                     << attrTag("Include",Option::fixPathToLocalOS(info.file));
       
  3042             } else if(info.file.endsWith(".res")) {
       
  3043 
       
  3044                     xmlFilter << tag("CustomBuild")
       
  3045                               << attrTag("Include",Option::fixPathToLocalOS(info.file))
       
  3046                               << attrTagS("Filter", filtername);
       
  3047 
       
  3048                     xml << tag("CustomBuild")
       
  3049                         << attrTag("Include",Option::fixPathToLocalOS(info.file));
  3026             } else {
  3050             } else {
  3027 
  3051 
  3028                 xmlFilter << tag("CustomBuild")
  3052                 xmlFilter << tag("CustomBuild")
  3029                           << attrTag("Include",Option::fixPathToLocalOS(info.file))
  3053                           << attrTag("Include",Option::fixPathToLocalOS(info.file))
  3030                           << attrTagS("Filter", filtername);
  3054                           << attrTagS("Filter", filtername);
  3031 
  3055 
  3032                 xml << tag("CustomBuild")
  3056                 xml << tag("CustomBuild")
  3033                     << attrTag("Include",Option::fixPathToLocalOS(info.file));
  3057                     << attrTag("Include",Option::fixPathToLocalOS(info.file));
  3034             }
  3058             }
  3035 
  3059 
       
  3060         } else if(filtername == "Root Files") {
       
  3061 
       
  3062             if (info.file.endsWith(".rc")) {
       
  3063 
       
  3064                 xmlFilter << tag("ResourceCompile")
       
  3065                           << attrTag("Include",Option::fixPathToLocalOS(info.file));
       
  3066 
       
  3067                 xml << tag("ResourceCompile")
       
  3068                     << attrTag("Include",Option::fixPathToLocalOS(info.file));
       
  3069             }
  3036         } else {
  3070         } else {
  3037 
  3071 
  3038             xmlFilter << tag("None")
  3072             xmlFilter << tag("None")
  3039                       << attrTag("Include",Option::fixPathToLocalOS(info.file))
  3073                       << attrTag("Include",Option::fixPathToLocalOS(info.file))
  3040                       << attrTagS("Filter", filtername);
  3074                       << attrTagS("Filter", filtername);
  3327     tool.outputFilter(xml, xmlFilter, "Form Files");
  3361     tool.outputFilter(xml, xmlFilter, "Form Files");
  3328     tool.outputFilter(xml, xmlFilter, "Resource Files");
  3362     tool.outputFilter(xml, xmlFilter, "Resource Files");
  3329     for (int x = 0; x < tool.ExtraCompilers.count(); ++x) {
  3363     for (int x = 0; x < tool.ExtraCompilers.count(); ++x) {
  3330         tool.outputFilter(xml, xmlFilter, tool.ExtraCompilers.at(x));
  3364         tool.outputFilter(xml, xmlFilter, tool.ExtraCompilers.at(x));
  3331     }
  3365     }
       
  3366     tool.outputFilter(xml, xmlFilter, "Root Files");
  3332 
  3367 
  3333     xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets");
  3368     xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets");
  3334 
  3369 
  3335     xml << tag("ImportGroup")
  3370     xml << tag("ImportGroup")
  3336         << attrTag("Label", "ExtensionTargets")
  3371         << attrTag("Label", "ExtensionTargets")