summaryrefslogtreecommitdiff
path: root/dist/win_projects/vs2010.template
blob: a6165afe32e21fc70633192ee836cb9398808ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
declare variable $xmlversion := "1.0";
declare variable $xmlencoding := "utf-8";
declare variable $msbversion := "4.0";
declare variable $msbdefprops := '$(VCTargetsPath)\Microsoft.Cpp.Default.props';
declare variable $msbprops := '$(VCTargetsPath)\Microsoft.Cpp.props';
declare variable $msbtargets := "$(VCTargetsPath)\Microsoft.Cpp.targets";
declare variable $projectList := "@PROJECT_INPUT@";
declare variable $mobile := xs:boolean(doc($projectList)/projects/variable[@name="mobile"]);
declare variable $debugOptLevel := "Disabled";
declare variable $releaseOptLevel := "MaxSpeed";
declare variable $warnLevel := "Level3";
declare variable $debugInfo := "ProgramDatabase";
declare variable $sourcePath := doc($projectList)/projects/variable[@name="sourcePath"];
declare variable $vsversion := "@VISUAL_STUDIO_VERSION@";
declare variable $dllType := "dll";
declare variable $appType := "Application";
declare variable $special_file := "src/crypto/crypto.c;src/crypto/aes_method.c";

declare function local:genImportProperty($project)
{
  let $libprop :=  if ($project/type/text() eq "library") then "library.props"
		   else "application.props"
  return 
  (local:indent(2),<ImportGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    {local:indent(4)}<Import Project="{$libprop}"/>
  {local:indent(2)}</ImportGroup>)
};

declare function local:indent($n) 
{
  concat("&#xa;",string-join(for $i in (1 to $n) return " ", ""))
};

declare function local:getPlatforms($version) 
{
  if ($version eq "7.10") then ("Win32")
  else ("Win32", "x64")
};

declare function local:getGuid($project)
{
  concat("{",$project/@guid,"}")
};

declare function local:generateProjectConfigurations($project)
{
  local:indent(2),<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Label="ProjectConfigurations">
  {for $config in local:getConfiguration($project) return 
    for $platform in local:getPlatforms($vsversion) return 
       (local:indent(4),<ProjectConfiguration Include="{concat($config, "|",$platform)}">
       {local:indent(6)}<Configuration>{$config}</Configuration>
       {local:indent(6)}<Platform>{$platform}</Platform>
       {local:indent(4)}</ProjectConfiguration>)
  }
  {local:indent(2)}</ItemGroup>
};

declare function local:generateGlobalProperty($project)
{
  local:indent(2),<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Label="Globals">
    {local:indent(2)}<ProjectGuid>{local:getGuid($project)}</ProjectGuid> 	
  {local:indent(2)}</PropertyGroup>
};

declare function local:getProjects()
{
  doc($projectList)/projects/project[@name="@PROJECT_NAME@"]
};

declare function local:configurationType($project, $config)
{
  if ($project/type eq "library") then if (contains($config,"Static")) then
    "StaticLibrary" else "DynamicLibrary"
  else if ($project/type eq "app") then "Application"
  else error(QName("","xqilla"),"configurationType:unkown project type")
};

declare function local:generateConfigurations($project)
{
  for $platform in local:getPlatforms($vsversion) return
    for $config in local:getConfiguration($project) 
      let $configType := local:configurationType($project,$config)	    
      return 
      (local:indent(2),<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003" 
                        Condition="'$(Configuration)|$(Platform)'=={concat("'",$config,"|",$platform,"'")}"
			Label="Configuration">
        {local:indent(4)}<ConfigurationType>{$configType}</ConfigurationType>
	{local:indent(4)}<UseOfMfc>false</UseOfMfc>
	{local:indent(4)}<CharacterSet>MultiByte</CharacterSet>
      {local:indent(2)}</PropertyGroup>
      )
};

declare function local:genExtensionSettings()
{
  local:indent(2),<ImportGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Label="ExtensionSettings">
  {local:indent(2)}</ImportGroup>
};

declare function local:genExtensionTargets()
{
  local:indent(2),<ImportGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Label="ExtensionTargets">
  {local:indent(2)}</ImportGroup>
};

declare variable $msbuserprops := "$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props";
declare variable $msbuserpropsexit := "exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')";


declare function local:genPropertySheets($project)
{
  local:indent(2),<ImportGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  {local:indent(4)}<Import xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
                     Project="{$msbuserprops}" Condition="{$msbuserpropsexit}" Label="LocalAppDataPlatform" />
  {local:indent(4)}</ImportGroup>	     
};

declare function local:windowsPath($path) as xs:string
{
  translate($path,"/","\\")
};


declare function local:getLibName($name, $config)
{
  doc($projectList)/projects/library[@name=$name]/libname[@config=$config]/text()
};

declare function local:genMacros($project)
{ 
    local:genDynamicMacros($project)
};  

declare function local:genTargetName($project,$config)
{
  if ($project/type eq "library") then 
     local:getLibName($project/@name, $config)
  else
     if (not(empty($project/@output))) then data($project/@output) else data($project/@name)
};

declare function local:genTargetExt($project, $config)
{
  if ($project/type eq "library") then 
    if (contains($config, "Static")) then ".lib"
    else ".dll"
  else ".exe"
};

(: no static variable usage now :)

declare function local:genDynamicMacros($project)
{
  let $projType := $project/type return(
  local:indent(2),<PropertyGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    {local:indent(4)}<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
      {if ( not(empty($project/@output))) then
	 if ( $projType eq "library") then 
	   for $platform in local:getPlatforms($vsversion) return
             for $config in local:getConfiguration($project) return
	       (local:indent(4),<TargetName xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
                               Condition="'$(Configuration)|$(Platform)'=={concat("'",$config,"|",$platform,"'")}">{local:genTargetName($project,$config)}</TargetName>)
         else (local:indent(4),<TargetName xmlns="http://schemas.microsoft.com/developer/msbuild/2003">{local:genTargetName($project,"null")}</TargetName>)
       else () 
      }
  {local:indent(2)}</PropertyGroup>
)
};


declare function local:isDebug($config) as xs:boolean
{
  contains($config,"Debug")
};

declare function local:isRelease($config) as xs:boolean
{
  contains($config,"Release")
};

declare function local:optLevel($config)
{
  if (local:isDebug($config)) then $debugOptLevel
  else $releaseOptLevel
};

declare function local:addIncludeDirectories($project,$config)
{
  let $incref := for $inc in $project/include[@type="ref"] return 
	if ($inc/text() eq "all") then ()
	else doc($projectList)/projects/include[@name=$inc]
  let $increl := $project/include[@type="rel"]
  return 
    if ($incref or $increl) then (
    local:indent(6), <AdditionalIncludeDirectories xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    {translate(concat(string-join($incref,";"),
		     if (not(empty($increl)) and not(empty($incref))) then ";" else "",
			    string-join($increl,";"),";","%(AdditionalIncludeDirectories)"),",",";")}</AdditionalIncludeDirectories>)
    else ()
};

declare function local:getProjectType($project, $config)
{ 
  if ($project/type eq "library") then if (contains($config,"Static")) then "static_lib"
    else "dll"
  else if ($project/type eq "app") then if (contains($config,"Static")) then "static_app"
    else "app"
  else error(QName("","dbxml"),"getProjectType:unkown project type")
};

declare function local:generateCompilerPreprocessorDefs($project,$config) 
{ 
  let $ptype := local:getProjectType($project, $config)
  let $proj := $project/preprocessor[@config="all" or @config=$config]
  let $projType := $project/preprocessor[@config=$ptype]
  return 
    if ($proj or $projType) then
 	(local:indent(6),<PreprocessorDefinitions xmlns="http://schemas.microsoft.com/developer/msbuild/2003">   
         {concat(string-join(($proj,$projType),";"),";","%(PreprocessorDefinitions)")}</PreprocessorDefinitions>
	)
    else ()
};

declare function local:runtimeLibrary($config)
{
  if (local:isDebug($config)) then
    if (contains($config,"Static")) then "MultiThreadedDebug" else "MultiThreadedDebugDLL"
  else 
    if (contains($config,"Static")) then "MultiThreaded" else "MultiThreadedDLL"
};

declare function local:makeObjectFile($project,$config)
{
  concat("$(OutDir)", if (not(empty($project/@output))) then $project/@output else $project/@name,"/")
};

declare function local:addDebugInformation($config)
{
   local:indent(6),<DebugInformationFormat xmlns="http://schemas.microsoft.com/developer/msbuild/2003">{$debugInfo}</DebugInformationFormat>,
   if (local:isDebug($config)) then (local:indent(6),<BasicRuntimeChecks xmlns="http://schemas.microsoft.com/developer/msbuild/2003">EnableFastChecks</BasicRuntimeChecks>) else ()
};

declare function local:addCompileOptions($project, $platform, $config)
{
  if ($project/options/compile[contains(@platform,$platform)]) then
	let $opt := string-join(($project/options/compile[contains(@platform, $platform)]), " ")
	return (
	  if ($opt) then (local:indent(6),<AdditionalOptions xmlns="http://schemas.microsoft.com/developer/msbuild/2003">{string-join(($opt,"%(AdditionalOptions)")," ")}</AdditionalOptions> )
	  else ())
  else ()
};

declare function local:addLinkOptions($project, $platform, $config)
{
  if ($project/options/link[contains(@config,$config)]) then 
  	let $opt := string-join(($project/options/link[contains(@config,$config)])," ") 
  	return ( 
	  if ($opt) then (local:indent(6),<AdditionalOptions xmlns="http://schemas.microsoft.com/developer/msbuild/2003">{string-join(($opt,"%(AdditionalOptions)")," ")}</AdditionalOptions> )
          else ())
  else ()
};

declare function local:addLibraryDependencies($project,$config)
{

  let $libdep := (
  if (contains($project/type, "lib")) then 
    string-join(for $dep in $project/depends return concat(local:getLibName($dep,$config),".lib"), ";")
  else (
    string-join(for $dep in $project/depends return (
       if (not($dep/text() eq "db")) then  
    	concat(local:getLibName($dep,$config),".lib")
       else ()
    ), ";")
  )) return 
    if ($libdep and not($libdep eq ";")) then (
      local:indent(6),<AdditionalDependencies xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 
      {$libdep};%(AdditionalDependencies)</AdditionalDependencies>
    )
    else ()
};


declare function local:addProjectDependencies($project)
{	
   for $mydep in $project/references
	   let $mytemp := lower-case(concat("{",doc($projectList)/projects/project[@name=$mydep]/@guid,"}"))
	   return
	   (local:indent(4), <ProjectReference Condition="exists('{concat($mydep,".vcxproj")}')" Include="{concat($mydep,".vcxproj")}" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	    {local:indent(6)}<Project>{$mytemp}</Project>
	    {local:indent(6)}<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
           {local:indent(4)}</ProjectReference>)
};

declare function local:makeLibraryDirectory($lib,$platform,$config)
{
  for $dir in $lib/platform[contains(@name,$platform)]/config[$config=./@type]/libdir
    return 
      if (not(empty($lib/libbase[@vsver=$vsversion]))) then 
        concat($lib/libbase[@vsver=$vsversion],"/",$dir)
      else $dir
};

declare function local:addLibraryDirectories($project, $platform, $config)
{
  string-join((for $dep in $project/depends return local:makeLibraryDirectory(doc($projectList)/projects/library[@name=$dep],$platform,$config),"../../lib"),";")
};

declare function local:makeOutputPDBFile($project,$config)
{
  if ($project/type eq "library") then
    concat("$(OutDir)",local:getLibName($project/@name,$config),".pdb")
  else
    concat("$(OutDir)",if (not(empty($project/@output))) then $project/@output else $project/@name,".pdb")
};

declare function local:makeImportLibrary($project,$config)
{
  if ($project/type eq "library" and not(contains($config,"Static"))) then
    (local:indent(6),<ImportLibrary xmlns="http://schemas.microsoft.com/developer/msbuild/2003">{concat("$(OutDir)",local:getLibName($project/@name,$config),".lib")}</ImportLibrary>)
  else ()
};

declare function local:makeModuleDefinition($project,$config)
{
  if (not(empty($project/moddef))) then
    let $temp := concat($sourcePath,$project/moddef/@file)
    return
    (local:indent(6),<ModuleDefinitionFile xmlns="http://schemas.microsoft.com/developer/msbuild/2003">{local:windowsPath($temp)}</ModuleDefinitionFile>)
  else ()
};

declare function local:generateCustomBuildTool($project,$config)
{ 
    if (not(empty($project/event[@name="custom"]))) then 
        let $commandtext := $project/event[@name="custom"]/command[contains(@config,$config)]/text()
        let $outputs := concat($project/event[@name="custom"]/output,";%(Outputs)")
        return (	  
            local:indent(4),<CustomBuildStep xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	    {local:indent(6)}<Command>{$commandtext}</Command>
	    {local:indent(6)}<Outputs>{$outputs}</Outputs>
	    {local:indent(4)}</CustomBuildStep>)
    else if (not(empty($project/event[@name="postbuild"]))) then 
	let $commandtext := $project/event[@name="postbuild"]/command[contains(@config,$config)]/text()
        let $message := $project/event[@name="postbuild"]/description
        return (
	    local:indent(4),<PostBuildEvent xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	    {local:indent(6)}<Command>{$commandtext}</Command>
	    {local:indent(6)}<Message>{$message}</Message>
	    {local:indent(4)}</PostBuildEvent>)
    else if (not(empty($project/event[@name="prebuild"]))) then 
	let $commandtext := $project/event[@name="prebuild"]/command[contains(@config,$config)]/text()
        let $message := $project/event[@name="prebuild"]/description
        return (
	    local:indent(4),<PreBuildEvent xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	    {local:indent(6)}<Command>{$commandtext}</Command>
	    {local:indent(6)}<Message>{$message}</Message>
	    {local:indent(4)}</PreBuildEvent>)
     else ()
};


declare function local:genDefinition($project)
{
    local:genDynamicDefinition($project)
};


declare function local:generateConfigCompiler($project,$platform,$config)
{
          let $clcompile := <ClCompile xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	  {local:addCompileOptions($project,$platform,$config)}
	  {local:addIncludeDirectories($project,$config)}
	  {local:generateCompilerPreprocessorDefs($project,$config)}
	  {local:indent(4)}</ClCompile> 
          return
	    if ($clcompile//*) then (local:indent(4),$clcompile)
	    else ()
};
declare function local:generateDynamicLink($project, $platform, $config)
{
	let $dynlink := <Link xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	{local:addLinkOptions($project,$platform,$config)}
	{local:addLibraryDependencies($project,$config)}
	{local:makeModuleDefinition($project,$config)}
	{local:indent(4)}</Link>
	return 
	  if ($dynlink//*) then (local:indent(4),$dynlink)
	  else ()
};
declare function local:generateConfigLibrarian($project,$platform,$config)
{ let $linkoptions := local:addLinkOptions($project,$platform,$config) return
  if ($linkoptions) then 
  (local:indent(4),<Lib xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
  {$linkoptions}
  {local:indent(4)}</Lib>)
  else ()
};


declare function local:generateStaticLink($project,$platform,$config)
{ 
  if (contains($project/type,"lib")) then
    local:generateConfigLibrarian($project,$platform,$config)
  else 
    local:generateDynamicLink($project,$platform,$config)
};

declare function local:genDynamicDefinition($project)
{
  for $platform in local:getPlatforms($vsversion) return
    for $config in local:getConfiguration($project) 
    let $static := contains($config, "Static")
    return
    (
      let $mynode := <ItemDefinitionGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
                           Condition="'$(Configuration)|$(Platform)'=={concat("'",$config,"|",$platform,"'")}"> 
	{local:generateConfigCompiler($project,$platform,$config)}
        {if ($static) then local:generateStaticLink($project,$platform,$config)
        else local:generateDynamicLink($project,$platform,$config)}
	{local:generateCustomBuildTool($project,$config)}
        {local:indent(2)}</ItemDefinitionGroup>
      return
	if ($mynode//*) then (local:indent(2),$mynode)
	else ()
    )
};

declare function local:genStaticDefinition($project)
{
  for $platform in local:getPlatforms($vsversion) return
    for $config in local:getConfiguration($project) return
    (
      local:indent(2),<ItemDefinitionGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
                           Condition="'$(Configuration)|$(Platform)'=={concat("'",$config,"|",$platform,"'")}"> 
	{local:generateConfigCompiler($project,$platform,$config)}
	{local:generateStaticLink($project,$platform,$config)}
	{local:generateCustomBuildTool($project,$config)}
      {local:indent(2)}</ItemDefinitionGroup>
    )
};

declare function local:generateIncFilesNoFilter($project)
{ let $incfile := 
  (for $file in $project/files//file return
    if (ends-with($file/@name,".h") or ends-with($file/@name,".hpp")) then 
      (local:indent(4),<ClInclude xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Include="{local:windowsPath(concat($sourcePath,$file/@name))}" />)
    else ()
  ) return 
    if (empty($incfile)) then ()
    else (local:indent(2),<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  			{$incfile}
			{local:indent(2)}</ItemGroup>)
};

declare function local:generateSrcFilesNoFilter($project)
{ let $srcfile :=
  (for $file in $project/files//file return
      if (ends-with($file/@name,".rc") or ends-with($file/@name,".def") or ends-with($file/@name,".h") or ends-with($file/@name,".hpp")) then ()
      else ( 
        if (contains($special_file, $file/@name)) then 
	  (local:indent(4),<ClCompile xmlns="http://schemas.microsoft.com/developer/msbuild/2003" 
                                      Condition="exists('{local:windowsPath(concat($sourcePath,$file/@name))}')"
                                      Include="{local:windowsPath(concat($sourcePath,$file/@name))}"/>)		 
        else  
	  (local:indent(4),<ClCompile xmlns="http://schemas.microsoft.com/developer/msbuild/2003" 
                                      Include="{local:windowsPath(concat($sourcePath,$file/@name))}"/>)		 
      )
  ) return
    if (empty($srcfile)) then ()
    else (local:indent(2),<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003" > 
            {$srcfile}
           {local:indent(2)}</ItemGroup>)
};


declare function local:generateRcFilesNoFilter($project)
{
  for $file in $project/files//file return
       if (ends-with($file/@name,".rc")) then
	    (local:indent(2),<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	       {local:indent(4)}<ResourceCompile Include="../{substring-after($file/@name,"/")}">
	       {for $platform in local:getPlatforms($vsversion) return
	          for $config in local:getConfiguration($project) return(
		    local:indent(6), <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=={concat("'",$config,"|",$platform,"'")}">{concat(if ($config="Debug") then "_DEBUG" else "NDEBUG",";","$(NoInherit))",";%(PreprocessorDefinitions)")}</PreprocessorDefinitions>)
	       }
	       {local:indent(4)}</ResourceCompile> 
	    {local:indent(2)}</ItemGroup>	    
	    )
	else ()
	
 
};
	

declare function local:generateDefFilesNoFilter($project)
{
  for $file in $project/files//file return
    if (ends-with($file/@name,".def")) then 
      (
         local:indent(2),<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	   {local:indent(4)}<None Include="../{substring-after($file/@name,"/")}" />
	 {local:indent(2)}</ItemGroup>
      )
    else ()
};

declare function local:generateFilesWithFilter($project,$filter)
{
<a/>
};

declare function local:genFiles($project)
{
    local:generateIncFilesNoFilter($project),
    local:generateSrcFilesNoFilter($project),
    local:generateDefFilesNoFilter($project),
    local:generateRcFilesNoFilter($project)
};


declare function local:getConfiguration($project)
{
  for $compType in ("Debug", "Release") return
    for $config in $project/configuration return
      concat($config, $compType)    
};


for $project in local:getProjects() 
return 
('<?xml version="1.0" encoding="utf-8" ?>',
<Project DefaultTargets="Build" ToolsVersion="{$msbversion}" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  {local:generateProjectConfigurations($project)}
  {local:generateGlobalProperty($project)}
  {local:indent(2)}<Import Project="{$msbdefprops}" />
  {local:generateConfigurations($project)}
  {local:indent(2)}<Import Project="{$msbprops}" />
  {local:genExtensionSettings()}
  {local:genPropertySheets($project)}
  {local:genImportProperty($project)}
  {local:indent(2)}<PropertyGroup Label="UserMacros" />
  {local:genMacros($project)}
  {local:genDefinition($project)}
  {local:genFiles($project)}
  {local:indent(2)}<Import Project="{$msbtargets}" />
  {local:genExtensionTargets()}
  {local:indent(2)}<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">	
  {local:addProjectDependencies($project)}
  {local:indent(2)}</ItemGroup>
{local:indent(0)}</Project>)