_preload.lua 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. --
  2. -- _preload.lua
  3. -- Define the makefile action(s).
  4. -- Copyright (c) Jason Perkins and the Premake project
  5. --
  6. local p = premake
  7. local project = p.project
  8. -- initialize module.
  9. p.modules.vstudio = p.modules.vstudio or {}
  10. p.modules.vstudio._VERSION = p._VERSION
  11. p.vstudio = p.modules.vstudio
  12. -- load actions.
  13. include("vs2005.lua")
  14. include("vs2008.lua")
  15. include("vs2010.lua")
  16. include("vs2012.lua")
  17. include("vs2013.lua")
  18. include("vs2015.lua")
  19. include("vs2017.lua")
  20. include("vs2019.lua")
  21. include("vs2022.lua")
  22. -- Initialize Specific API
  23. p.api.addAllowed("debugger", "VisualStudioLocal")
  24. p.api.addAllowed("debugger", "VisualStudioRemote")
  25. p.api.addAllowed("debugger", "VisualStudioWebBrowser")
  26. p.api.addAllowed("debugger", "VisualStudioWebService")
  27. p.api.register {
  28. name = "shaderoptions",
  29. scope = "config",
  30. kind = "list:string",
  31. tokens = true,
  32. pathVars = true,
  33. }
  34. p.api.register {
  35. name = "shaderdefines",
  36. scope = "config",
  37. kind = "list:string",
  38. tokens = true,
  39. }
  40. p.api.register {
  41. name = "shaderincludedirs",
  42. scope = "config",
  43. kind = "list:directory",
  44. tokens = true,
  45. pathVars = true,
  46. }
  47. p.api.register {
  48. name = "shadertype",
  49. scope = "config",
  50. kind = "string",
  51. allowed = {
  52. "Effect",
  53. "Vertex",
  54. "Pixel",
  55. "Geometry",
  56. "Hull",
  57. "Domain",
  58. "Compute",
  59. "Mesh",
  60. "Amplification",
  61. "Texture",
  62. "RootSignature",
  63. }
  64. }
  65. p.api.register {
  66. name = "shadermodel",
  67. scope = "config",
  68. kind = "string",
  69. allowed = {
  70. "2.0",
  71. "3.0",
  72. "4.0_level_9_1",
  73. "4.0_level_9_3",
  74. "4.0",
  75. "4.1",
  76. "5.0",
  77. "5.1",
  78. "rootsig_1.0",
  79. "rootsig_1.1",
  80. "6.0",
  81. "6.1",
  82. "6.2",
  83. "6.3",
  84. "6.4",
  85. "6.5"
  86. }
  87. }
  88. p.api.register {
  89. name = "shaderentry",
  90. scope = "config",
  91. kind = "string",
  92. tokens = true,
  93. }
  94. p.api.register {
  95. name = "shadervariablename",
  96. scope = "config",
  97. kind = "string",
  98. tokens = true,
  99. }
  100. p.api.register {
  101. name = "shaderheaderfileoutput",
  102. scope = "config",
  103. kind = "string",
  104. tokens = true,
  105. }
  106. p.api.register {
  107. name = "shaderobjectfileoutput",
  108. scope = "config",
  109. kind = "string",
  110. tokens = true,
  111. }
  112. p.api.register {
  113. name = "shaderassembler",
  114. scope = "config",
  115. kind = "string",
  116. allowed = {
  117. "NoListing",
  118. "AssemblyCode",
  119. "AssemblyCodeAndHex",
  120. }
  121. }
  122. p.api.register {
  123. name = "shaderassembleroutput",
  124. scope = "config",
  125. kind = "string",
  126. tokens = true,
  127. }
  128. p.api.register { -- DEPRECATED 2019-10-21
  129. name = "debuggerflavor",
  130. scope = "config",
  131. kind = "string",
  132. allowed = {
  133. "Local",
  134. "Remote",
  135. "WebBrowser",
  136. "WebService"
  137. }
  138. }
  139. p.api.deprecateField("debuggerflavor", 'Use `debugger` instead.',
  140. function(value)
  141. debugger('VisualStudio' .. value)
  142. end)
  143. --
  144. -- Decide when the full module should be loaded.
  145. --
  146. return function(cfg)
  147. return
  148. _ACTION == "vs2005" or
  149. _ACTION == "vs2008" or
  150. _ACTION == "vs2010" or
  151. _ACTION == "vs2012" or
  152. _ACTION == "vs2013" or
  153. _ACTION == "vs2015" or
  154. _ACTION == "vs2017" or
  155. _ACTION == "vs2019" or
  156. false;
  157. end