Template.msvc.pp 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. //
  2. // Template.msvc.pp
  3. //
  4. // This file defines the set of ouput files that will be generated to
  5. // support a Microsoft Visual C++ .NET solution / project build. It rolls
  6. // libraries into their metalibs, generates .dll files, compiles source
  7. // files to .obj files, and does other Windows-specific things.
  8. // Before this file is processed, the following files are read and
  9. // processed (in order):
  10. // The Package.pp file in the root of the current source hierarchy
  11. // (e.g. $PANDA/Package.pp)
  12. // $DTOOL/Package.pp
  13. // $DTOOL/Config.pp
  14. // $DTOOL/Config.Platform.pp
  15. // The user's PPREMAKE_CONFIG file.
  16. // $DTOOL/pptempl/System.pp
  17. // All of the Sources.pp files in the current source hierarchy
  18. // $DTOOL/pptempl/Global.pp
  19. // $DTOOL/pptempl/Global.msvc.pp
  20. // $DTOOL/pptempl/Depends.pp, once for each Sources.pp file
  21. // Template.msvc.pp (this file), once for each Sources.pp file
  22. #defun decygwin frompat,topat,path
  23. #foreach file $[path]
  24. #if $[isfullpath $[file]]
  25. $[patsubstw $[frompat],$[topat],$[cygpath_w $[file]]]
  26. #else
  27. $[patsubstw $[frompat],$[topat],$[osfilename $[file]]]
  28. #endif
  29. #end file
  30. #end decygwin
  31. // should overwrite read-only files
  32. #define COPYCMD xcopy /Y /Q /R
  33. #if $[ne $[CTPROJS],]
  34. #define dtool_ver_dir_cyg $[DTOOL]/src/dtoolbase
  35. #define dtool_ver_dir $[decygwin %,%,$[dtool_ver_dir_cyg]]
  36. #endif
  37. //////////////////////////////////////////////////////////////////////
  38. #if $[or $[eq $[DIR_TYPE], src],$[eq $[DIR_TYPE], metalib]]
  39. //////////////////////////////////////////////////////////////////////
  40. // For a source directory, build a single Makefile with rules to build
  41. // each target.
  42. #if $[build_directory]
  43. // This is the real set of lib_targets we'll be building. On Windows,
  44. // we don't build the shared libraries which are included on metalibs.
  45. #define real_lib_targets
  46. #define deferred_objs
  47. #forscopes lib_target
  48. #if $[eq $[module $[TARGET],$[TARGET]],]
  49. // This library is not on a metalib, so we can build it.
  50. #set real_lib_targets $[real_lib_targets] $[active_target]
  51. #else
  52. // This library is on a metalib, so we can't build it, but we
  53. // should build all the obj's that go into it.
  54. #set deferred_objs $[deferred_objs] \
  55. $[patsubst %_src.cxx,,%.c %.cxx %.yxx %.lxx,$[so_dir]\%.obj,%,,$[get_sources] $[get_igateoutput]]
  56. #endif
  57. #end lib_target
  58. #defer lib_projects \
  59. $[active_target(metalib_target lib_target noinst_lib_target)] \
  60. $[real_lib_targets]
  61. #defer static_lib_projects \
  62. $[active_target(static_lib_target ss_lib_target)]
  63. #defer bin_projects \
  64. $[active_target(bin_target noinst_bin_target)]
  65. #defer test_bin_projects \
  66. $[active_target(test_bin_target)]
  67. // We need to know the various targets we'll be building.
  68. // $[lib_targets] will be the list of dynamic libraries,
  69. // $[static_lib_targets] the list of static libraries, and
  70. // $[bin_targets] the list of binaries. $[test_bin_targets] is the
  71. // list of binaries that are to be built only when specifically asked
  72. // for.
  73. #define lib_targets $[patsubst %,lib%$[dllext].$[dlllib],$[lib_projects]]
  74. #define static_lib_targets $[static_lib_projects:%=lib%$[dllext].lib]
  75. #define bin_targets $[bin_projects:%=%.exe] $[active_target(sed_bin_target)]
  76. #define test_bin_targets $[test_bin_projects:%=%.exe]
  77. #define all_targets $[unique $[lib_targets] $[static_lib_targets] \
  78. $[bin_targets] $[test_bin_targets]]
  79. // $[so_sources] is the set of sources that belong on a shared object,
  80. // and $[st_sources] is the set of sources that belong on a static
  81. // object, like a static library or an executable. In Windows, we
  82. // don't need to make this distinction, but we do anyway in case we
  83. // might in the future for some nutty reason.
  84. #defer so_sources $[get_sources(metalib_target lib_target noinst_lib_target)]
  85. #defer st_sources $[get_sources(static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target)]
  86. // These are the source files that our dependency cache file will
  87. // depend on. If it's an empty list, we won't bother writing rules to
  88. // freshen the cache file.
  89. #define dep_sources $[sort $[filter %.c %.cxx %.yxx %.lxx %.h %.I %.I,$[so_sources] $[st_sources]]]
  90. #if $[eq $[so_dir],$[st_dir]]
  91. // If the static and shared directories are the same, we have to use the
  92. // same rules to build both shared and static targets.
  93. #set st_sources $[so_sources] $[st_sources]
  94. #set so_sources
  95. #endif
  96. #endif // $[build_directory]
  97. // And these are the various source files, extracted out by type.
  98. #defer cxx_so_sources $[filter_out %_src.cxx,$[filter %.cxx,$[so_sources]]]
  99. #defer cxx_st_sources $[filter_out %_src.cxx,$[filter %.cxx,$[st_sources]]]
  100. #defer c_so_sources $[filter %.c,$[so_sources]]
  101. #defer c_st_sources $[filter %.c,$[st_sources]]
  102. #defer yxx_so_sources $[filter %.yxx,$[so_sources]]
  103. #defer yxx_st_sources $[filter %.yxx,$[st_sources]]
  104. #defer lxx_so_sources $[filter %.lxx,$[so_sources]]
  105. #defer lxx_st_sources $[filter %.lxx,$[st_sources]]
  106. #defer h_sources $[filter %.h,$[so_sources] $[st_sources]]
  107. #defer i_sources $[filter %.I,$[so_sources] $[st_sources]]
  108. #if $[DO_PCH]
  109. #define pch_header_source $[get_precompiled_header(metalib_target lib_target noinst_lib_target)]
  110. #define st_pch_files $[patsubst %.h,$[st_dir]\%.pch,$[pch_header_source]]
  111. #define st_pch_obj_files $[patsubst %.h,$[st_dir]\%.obj,$[pch_header_source]]
  112. #endif
  113. // This map variable gets us all the various source files from all the
  114. // targets in this directory. We need it to look up the context in
  115. // which to build a particular source file, since some targets may
  116. // have different requirements (e.g. different local_libs, or
  117. // different USE_this or USE_that) than other targets.
  118. #map all_sources get_sources(metalib_target lib_target noinst_lib_target static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target)
  119. // $[target_ipath] is the proper ipath to put on the command line,
  120. // from the context of a particular target.
  121. #defer target_ipath $[RELDIR] $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%\include] $[get_ipath]
  122. // $[converted_ipath] is the properly-formatted version of the include path
  123. // for Visual Studio .NET. The resulting list is semicolon separated and uses
  124. // Windows-style pathnames.
  125. #defer converted_ipath $[join ;,$[osfilename $[target_ipath]]]
  126. // $[file_ipath] is the ipath from the context of a particular source
  127. // file, given in $[file]. It uses the all_sources map to look up
  128. // the target the source file belongs on, to get the proper context.
  129. #defer file_ipath $[all_sources $[target_ipath],$[file]]
  130. // These are the complete set of extra flags the compiler requires,
  131. // from the context of a particular file, given in $[file].
  132. #defer cflags $[all_sources $[get_cflags] $[CFLAGS],$[file]] $[CFLAGS_OPT$[OPTIMIZE]]
  133. #defer c++flags $[all_sources $[get_cflags] $[C++FLAGS],$[file]] $[CFLAGS_OPT$[OPTIMIZE]]
  134. // These are the same flags, sans the compiler optimizations.
  135. #defer noopt_c++flags $[all_sources $[get_cflags] $[C++FLAGS],$[file]] $[CFLAGS_OPT$[OPTIMIZE]]
  136. // $[complete_lpath] is rather like $[complete_ipath]: the list of
  137. // directories (from within this tree) we should add to our -L list.
  138. #defer complete_lpath $[libs $[RELDIR:%=%\$[ODIR]],$[actual_local_libs]] $[EXTRA_LPATH]
  139. // $[lpath] is like $[target_ipath]: it's the list of directories we
  140. // should add to our -L list, from the context of a particular target.
  141. #defer lpath $[sort $[complete_lpath]] $[other_trees:%=%\lib] $[get_lpath]
  142. // $[converted_lpath] is the properly-formatted version of the library path
  143. // for Visual Studio .NET. The resulting list is semicolon separated and uses
  144. // Windows-style pathnames.
  145. #defer converted_lpath $[join ;,$[osfilename $[lpath]]]
  146. // And $[libs] is the set of libraries we will link with.
  147. #defer libs $[unique $[actual_local_libs:%=%$[dllext]] $[patsubst %:c,,%:m %,%$[dllext],$[OTHER_LIBS]] $[get_libs]]
  148. #defer converted_libs $[patsubst %.lib,%.lib,%,lib%.lib,$[libs]]
  149. // This is the set of files we might copy into *.prebuilt, if we have
  150. // bison and flex (or copy from *.prebuilt if we don't have them).
  151. #define bison_prebuilt $[patsubst %.yxx,%.h,$[yxx_so_sources] $[yxx_st_sources]] $[patsubst %.yxx,%.cxx,$[yxx_so_sources] $[yxx_st_sources]] $[patsubst %.lxx,%.cxx,$[lxx_so_sources] $[lxx_st_sources]]
  152. // Rather than making a rule to generate each install directory later,
  153. // we create the directories now. This reduces problems from
  154. // multiprocess builds.
  155. #mkdir $[sort \
  156. $[if $[install_lib],$[install_lib_dir]] \
  157. $[if $[install_bin] $[install_scripts],$[install_bin_dir]] \
  158. $[if $[install_headers],$[install_headers_dir]] \
  159. $[if $[install_parser_inc],$[install_parser_inc_dir]] \
  160. $[if $[install_data],$[install_data_dir]] \
  161. $[if $[install_config],$[install_config_dir]] \
  162. $[if $[install_igatedb],$[install_igatedb_dir]] \
  163. $[if $[install_py],$[install_py_dir] $[install_py_package_dir]] \
  164. ]
  165. // Pre-compiled headers are one way to speed the compilation of many
  166. // C++ source files that include similar headers, but it turns out a
  167. // more effective (and more portable) way is simply to compile all the
  168. // similar source files in one pass.
  169. // We do this by generating a *_composite.cxx file that has an
  170. // #include line for each of several actual source files, and then we
  171. // compile the composite file instead of the original files.
  172. #foreach composite_file $[composite_list]
  173. #output $[composite_file] notouch
  174. #format collapse
  175. /* Generated automatically by $[PPREMAKE] $[PPREMAKE_VERSION] from $[SOURCEFILE]
  176. . */
  177. /* ################################# DO NOT EDIT ########################### */
  178. #foreach file $[$[composite_file]_sources]
  179. ##include "$[file]"
  180. #end file
  181. #end $[composite_file]
  182. #end composite_file
  183. /////////////////////////////////////////////////////////////////////
  184. // First, the dynamic libraries. Each lib_target and metalib_target
  185. // is a dynamic library.
  186. /////////////////////////////////////////////////////////////////////
  187. #forscopes metalib_target lib_target
  188. // In Windows, we don't actually build all the libraries. In
  189. // particular, we don't build any libraries that are listed on a
  190. // metalib. Is this one such library?
  191. #define build_it $[eq $[module $[TARGET],$[TARGET]],]
  192. // We might need to define a BUILDING_ symbol for win32. We use the
  193. // BUILDING_DLL variable name, defined typically in the metalib, for
  194. // this; but in some cases, where the library isn't part of a metalib,
  195. // we define BUILDING_DLL directly for the target.
  196. #define building_var $[or $[BUILDING_DLL],$[module $[BUILDING_DLL],$[TARGET]]]
  197. #define defines $[join ;,$[extra_defines] $[building_var]]
  198. // $[igatescan] is the set of C++ headers and source files that we
  199. // need to scan for interrogate. $[igateoutput] is the name of the
  200. // generated .cxx file that interrogate will produce (and which we
  201. // should compile into the library). $[igatedb] is the name of the
  202. // generated .in file that interrogate will produce (and which should
  203. // be installed into the /etc directory).
  204. #define igatescan $[get_igatescan]
  205. #define igateoutput $[get_igateoutput]
  206. #define igatedb $[get_igatedb]
  207. // If this is a metalib, it may have a number of components that
  208. // include interrogated interfaces. If so, we need to generate a
  209. // 'module' file within this library. This is mainly necessary for
  210. // Python; it contains a table of all of the interrogated functions,
  211. // so we can load the library as a Python module and have access to
  212. // the interrogated functions.
  213. // $[igatemscan] is the set of .in files generated by all of our
  214. // component libraries. If it is nonempty, then we do need to
  215. // generate a module, and $[igatemout] is the name of the .cxx file
  216. // that interrogate will produce to make this module.
  217. #define igatemscan $[get_igatemscan]
  218. #define igatemout $[get_igatemout]
  219. #if $[build_it]
  220. #define target $[ODIR]\$[lib_prefix]$[TARGET].$[dlllib]
  221. // Installation paths
  222. #define mybasename $[basename $[notdir $[target]]]
  223. #define tmpdirname_cyg $[install_lib_dir]/$[mybasename]
  224. #define tmpdirname_win $[osfilename $[tmpdirname_cyg]]
  225. // List of object files that will be combined to form this metalib target.
  226. #define objects \
  227. $[components \
  228. $[osfilename $[patsubst %,$[RELDIR]\$[%_obj],$[compile_sources]]], \
  229. $[active_component_libs]]
  230. #endif $[build_it]
  231. // Additional rules to generate and compile the interrogate data, if needed.
  232. #if $[igatescan]
  233. #define igatelib $[lib_prefix]$[TARGET]
  234. // The module name comes from the metalib that includes this library.
  235. #define igatemod $[module $[TARGET],$[TARGET]]
  236. #if $[eq $[igatemod],]
  237. // ... unless no metalib includes this library.
  238. #define igatemod $[TARGET]
  239. #endif
  240. // Built the complete interrogate.exe commandline
  241. #define igate_commandline \
  242. $[install_bin_dir]\$[INTERROGATE] -od $[igatedb] -oc $[igateoutput] \
  243. $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" \
  244. $[igatescan]
  245. // TODO: Install $[igatedb] in $[install_igatedb_dir]
  246. #endif // igatescan
  247. // And finally, some additional rules to build the interrogate module
  248. // file into the library, if this is a metalib that includes
  249. // interrogated components.
  250. #if $[igatemout]
  251. #define igatelib $[lib_prefix]$[TARGET]
  252. #define igatemod $[TARGET]
  253. #define igatemod_commandline \
  254. $[install_bin_dir]\$[INTERROGATE_MODULE] -oc $[igatemout] \
  255. -module "$[igatemod]" -library "$[igatelib]" $[interrogate_module_options] \
  256. $[igatemscan]
  257. #endif // igatemout
  258. #output $[TARGET].vcproj
  259. #format straight
  260. <?xml version="1.0" encoding = "Windows-1252"?>
  261. <VisualStudioProject
  262. ProjectType="Visual C++"
  263. Version="7.00"
  264. Name="$[TARGET]"
  265. ProjectGUID="{$[makeguid $[TARGET]]}"
  266. Keyword="CustomAppWizProj">
  267. <Platforms>
  268. <Platform
  269. Name="Win32"/>
  270. </Platforms>
  271. <Configurations>
  272. <Configuration
  273. Name="$[ODIR]|Win32"
  274. IntermediateDirectory="$[ODIR]"
  275. OutputDirectory="$[ODIR]"
  276. #if $[build_it]
  277. ConfigurationType="2">
  278. #else
  279. ConfigurationType="4">
  280. #endif
  281. <Tool
  282. Name="VCCLCompilerTool"
  283. AdditionalOptions="/Zm350"
  284. AdditionalIncludeDirectories="$[converted_ipath]"
  285. PreprocessorDefinitions="$[defines]"
  286. RuntimeLibrary="2"/>
  287. <Tool
  288. Name="VCCustomBuildTool"/>
  289. #if $[build_it]
  290. <Tool
  291. Name="VCLinkerTool"
  292. AdditionalDependencies="$[converted_libs] $[objects]"
  293. OutputFile="$[target]"
  294. AdditionalLibraryDirectories="$[converted_lpath]"/>
  295. #else
  296. <Tool
  297. Name="VCLibrarianTool"
  298. OutputFile=""/>
  299. #endif
  300. <Tool
  301. Name="VCMIDLTool"/>
  302. #if $[build_it]
  303. <Tool
  304. Name="VCPostBuildEventTool"
  305. Description="Copying $[target] to $[install_lib_dir]..."
  306. CommandLine="$[COPYCMD] $[target] $[install_bin_dir]"/>
  307. #else
  308. <Tool
  309. Name="VCPostBuildEventTool"/>
  310. #endif
  311. #if $[igatescan]
  312. <Tool
  313. Name="VCPreBuildEventTool"
  314. Description="Generating $[igateoutput] using $[INTERROGATE]..."
  315. CommandLine='$[igate_commandline]'/>
  316. #elif $[igatemscan]
  317. <Tool
  318. Name="VCPreBuildEventTool"
  319. Description="Generating $[igatemout] using $[INTERROGATE_MODULE]..."
  320. CommandLine='$[igatemod_commandline]'/>
  321. #else
  322. <Tool
  323. Name="VCPreBuildEventTool"/>
  324. #endif
  325. <Tool
  326. Name="VCPreLinkEventTool"/>
  327. <Tool
  328. Name="VCResourceCompilerTool"/>
  329. </Configuration>
  330. </Configurations>
  331. <Files>
  332. <Filter
  333. Name="Build"
  334. Filter="">
  335. <File
  336. RelativePath="Sources.pp">
  337. </File>
  338. <File
  339. RelativePath="$[TARGET].vcproj">
  340. </File>
  341. </Filter>
  342. #if $[compile_sources]
  343. #foreach file $[sort $[compile_sources]]
  344. <File
  345. RelativePath="$[file]">
  346. #if $[or $[eq $[file],$[igateoutput]],$[eq $[file],$[igatemout]]]
  347. <FileConfiguration
  348. Name="Opt3-Win32|Win32">
  349. <Tool
  350. Name="VCCLCompilerTool"
  351. ObjectFile="$[patsubst %,$[%_obj],$[file]]"/>
  352. </FileConfiguration>
  353. #endif
  354. </File>
  355. #end file
  356. #endif
  357. </Files>
  358. <Globals>
  359. </Globals>
  360. </VisualStudioProject>
  361. #end $[TARGET].vcproj
  362. #end metalib_target lib_target
  363. /////////////////////////////////////////////////////////////////////
  364. // Now the static libraries. Again, we assume there's no interrogate
  365. // interfaces going on in here, and there's no question of this being
  366. // a metalib, making the rules relatively simple.
  367. /////////////////////////////////////////////////////////////////////
  368. #forscopes static_lib_target ss_lib_target
  369. #define target $[ODIR]\$[lib_prefix]$[TARGET].lib
  370. #define defines $[join ;,$[extra_defines]]
  371. #output $[TARGET].vcproj
  372. #format straight
  373. <?xml version="1.0" encoding = "Windows-1252"?>
  374. <VisualStudioProject
  375. ProjectType="Visual C++"
  376. Version="7.00"
  377. Name="$[TARGET]"
  378. ProjectGUID="{$[makeguid $[TARGET]]}"
  379. Keyword="CustomAppWizProj">
  380. <Platforms>
  381. <Platform
  382. Name="Win32"/>
  383. </Platforms>
  384. <Configurations>
  385. <Configuration
  386. Name="$[ODIR]|Win32"
  387. IntermediateDirectory="$[ODIR]"
  388. OutputDirectory="$[ODIR]"
  389. ConfigurationType="4">
  390. <Tool
  391. Name="VCCLCompilerTool"
  392. AdditionalOptions="/Zm350"
  393. AdditionalIncludeDirectories="$[converted_ipath]"
  394. PreprocessorDefinitions="$[defines]"
  395. RuntimeLibrary="2"/>
  396. <Tool
  397. Name="VCCustomBuildTool"/>
  398. <Tool
  399. Name="VCLibrarianTool"
  400. OutputFile="$[target]"/>
  401. <Tool
  402. Name="VCMIDLTool"/>
  403. <Tool
  404. Name="VCPostBuildEventTool"
  405. Description="Copying $[target] to $[install_lib_dir]..."
  406. CommandLine="$[COPYCMD] $[target] $[install_lib_dir]"/>
  407. <Tool
  408. Name="VCPreBuildEventTool"/>
  409. <Tool
  410. Name="VCPreLinkEventTool"/>
  411. <Tool
  412. Name="VCResourceCompilerTool"/>
  413. </Configuration>
  414. </Configurations>
  415. <Files>
  416. #if $[compile_sources]
  417. #foreach file $[sort $[compile_sources]]
  418. <File
  419. RelativePath="$[file]">
  420. </File>
  421. #end file
  422. #endif
  423. </Files>
  424. <Globals>
  425. </Globals>
  426. </VisualStudioProject>
  427. #end $[TARGET].vcproj
  428. #end static_lib_target ss_lib_target
  429. /////////////////////////////////////////////////////////////////////
  430. // And now, the bin_targets. These are normal C++ executables. No
  431. // interrogate, metalibs, or any such nonsense here.
  432. /////////////////////////////////////////////////////////////////////
  433. #forscopes bin_target
  434. #define target $[ODIR]\$[TARGET].exe
  435. #define defines $[join ;,$[extra_defines]]
  436. #output $[TARGET].vcproj
  437. #format straight
  438. <?xml version="1.0" encoding = "Windows-1252"?>
  439. <VisualStudioProject
  440. ProjectType="Visual C++"
  441. Version="7.00"
  442. Name="$[TARGET]"
  443. ProjectGUID="{$[makeguid $[TARGET]]}"
  444. Keyword="CustomAppWizProj">
  445. <Platforms>
  446. <Platform
  447. Name="Win32"/>
  448. </Platforms>
  449. <Configurations>
  450. <Configuration
  451. Name="$[ODIR]|Win32"
  452. IntermediateDirectory="$[ODIR]"
  453. OutputDirectory="$[ODIR]"
  454. ConfigurationType="1">
  455. <Tool
  456. Name="VCCLCompilerTool"
  457. AdditionalOptions="/Zm350"
  458. AdditionalIncludeDirectories="$[converted_ipath]"
  459. PreprocessorDefinitions="$[defines]"
  460. RuntimeLibrary="2"/>
  461. <Tool
  462. Name="VCCustomBuildTool"/>
  463. <Tool
  464. Name="VCLinkerTool"
  465. AdditionalDependencies="$[converted_libs] $[objects]"
  466. OutputFile="$[target]"
  467. AdditionalLibraryDirectories="$[converted_lpath]"/>
  468. <Tool
  469. Name="VCMIDLTool"/>
  470. <Tool
  471. Name="VCPostBuildEventTool"
  472. Description="Copying $[target] to $[install_bin_dir]..."
  473. CommandLine="$[COPYCMD] $[target] $[install_bin_dir]"/>
  474. <Tool
  475. Name="VCPreBuildEventTool"/>
  476. <Tool
  477. Name="VCPreLinkEventTool"/>
  478. <Tool
  479. Name="VCResourceCompilerTool"/>
  480. </Configuration>
  481. </Configurations>
  482. <Files>
  483. #if $[compile_sources]
  484. #foreach file $[sort $[compile_sources]]
  485. <File
  486. RelativePath="$[file]">
  487. </File>
  488. #end file
  489. #endif
  490. </Files>
  491. <Globals>
  492. </Globals>
  493. </VisualStudioProject>
  494. #end $[TARGET].vcproj
  495. #end bin_target
  496. //////////////////////////////////////////////////////////////////////
  497. #elif $[eq $[DIR_TYPE], group]
  498. //////////////////////////////////////////////////////////////////////
  499. // This is a group directory: a directory above a collection of source
  500. // directories, e.g. $DTOOL/src. We don't need to output anything in
  501. // this directory.
  502. //////////////////////////////////////////////////////////////////////
  503. #elif $[eq $[DIR_TYPE], toplevel]
  504. //////////////////////////////////////////////////////////////////////
  505. // This is the toplevel directory, e.g. $DTOOL. Here we build the
  506. // package solution file and also synthesize the dtool_config.h (or
  507. // whichever file) we need.
  508. //#define project_scopes */static_lib_target */ss_lib_target */lib_target */noinst_lib_target */test_lib_target */metalib_target */bin_target */test_bin_target
  509. #define project_scopes */metalib_target */lib_target */static_lib_target */ss_lib_target */bin_target
  510. #output $[PACKAGE].sln
  511. #format straight
  512. Microsoft Visual Studio Solution File, Format Version 7.00
  513. #forscopes $[project_scopes]
  514. Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "$[TARGET]", "$[osfilename $[PATH]]\$[TARGET].vcproj", "{$[makeguid $[TARGET]]}"
  515. EndProject
  516. #end $[project_scopes]
  517. Global
  518. GlobalSection(SolutionConfiguration) = preSolution
  519. ConfigName.0 = $[ODIR]
  520. EndGlobalSection
  521. GlobalSection(ProjectDependencies) = postSolution
  522. #forscopes $[project_scopes]
  523. #define count 0
  524. #foreach dependency $[DEPEND_DIRS]
  525. {$[makeguid $[TARGET]]}.$[count] = {$[makeguid $[dependency]]}
  526. #set count $[+ $[count],1]
  527. #end dependency
  528. #end $[project_scopes]
  529. EndGlobalSection
  530. GlobalSection(ProjectConfiguration) = postSolution
  531. #forscopes $[project_scopes]
  532. #define guid $[makeguid $[TARGET]]
  533. {$[guid]}.$[ODIR].ActiveCfg = $[ODIR]|Win32
  534. {$[guid]}.$[ODIR].Build.0 = $[ODIR]|Win32
  535. #end $[project_scopes]
  536. EndGlobalSection
  537. GlobalSection(ExtensibilityGlobals) = postSolution
  538. EndGlobalSection
  539. GlobalSection(ExtensibilityAddIns) = postSolution
  540. EndGlobalSection
  541. EndGlobal
  542. #end $[PACKAGE].sln
  543. // If there is a file called LocalSetup.pp in the package's top
  544. // directory, then invoke that. It might contain some further setup
  545. // instructions.
  546. #sinclude $[TOPDIRPREFIX]LocalSetup.msvc.pp
  547. #sinclude $[TOPDIRPREFIX]LocalSetup.pp
  548. //////////////////////////////////////////////////////////////////////
  549. #elif $[or $[eq $[DIR_TYPE], models],$[eq $[DIR_TYPE], models_toplevel],$[eq $[DIR_TYPE], models_group]]
  550. //////////////////////////////////////////////////////////////////////
  551. #include $[THISDIRPREFIX]Template.models.pp
  552. //////////////////////////////////////////////////////////////////////
  553. #endif // DIR_TYPE