vc2012_fileRecurse.tpl 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {* *}
  2. {* Is this a dir or an item? *}
  3. {* *}
  4. {if is_array($dirWalk)}
  5. {* *}
  6. {* Iterate over children *}
  7. {* *}
  8. {foreach from=$dirWalk item=dir key=key}
  9. {include file="vc2010_fileRecurse.tpl" dirWalk=$dir dirName=$key dirPath="$dirPath$dirName/" depth=$depth+1}
  10. {/foreach}
  11. {else}
  12. {* *}
  13. {* Output an item *}
  14. {* *}
  15. {capture assign="itemOut"}
  16. {* we don't compile some files. *}
  17. {if dontCompile($dirWalk->path, $projOutput)}
  18. <ClCompile Include=
  19. "{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}">
  20. <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
  21. <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Optimized Debug|Win32'">true</ExcludedFromBuild>
  22. <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
  23. </ClCompile>
  24. {else}
  25. {if substr($dirWalk->path, -4, 4) == ".asm"}
  26. <CustomBuild Include="{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}">
  27. <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"{$binDir|replace:'//':'/'|replace:'/':'\\'}nasm\nasm.exe" -f win32 "%(FullPath)" -o "$(IntDir)%(Filename).obj"</Command>
  28. <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
  29. <Command Condition="'$(Configuration)|$(Platform)'=='Optimized Debug|Win32'">"{$binDir|replace:'//':'/'|replace:'/':'\\'}nasm\nasm.exe" -f win32 "%(FullPath)" -o "$(IntDir)%(Filename).obj"</Command>
  30. <Outputs Condition="'$(Configuration)|$(Platform)'=='Optimized Debug|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
  31. <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"{$binDir|replace:'//':'/'|replace:'/':'\\'}nasm\nasm.exe" -f win32 "%(FullPath)" -o "$(IntDir)%(Filename).obj"</Command>
  32. <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename).obj;%(Outputs)</Outputs>
  33. </CustomBuild>
  34. {elseif $projOutput->isSourceFile( $dirWalk->path ) }
  35. <ClCompile Include="{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}" />
  36. {elseif $projOutput->isResourceFile( $dirWalk->path ) }
  37. <ResourceCompile Include="{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}" />
  38. {else}
  39. <ClInclude Include="{$dirWalk->path|replace:'//':'/'|replace:'/':'\\'}" />
  40. {/if}{* if path == "*.asm" *}
  41. {/if}{* if dontCompile() *}
  42. {/capture}
  43. {$itemOut|indent:$depth:"\t"}
  44. {/if}