texturev.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. project ("texturev")
  2. uuid (os.uuid("texturev") )
  3. kind "ConsoleApp"
  4. configuration {}
  5. includedirs {
  6. path.join(BX_DIR, "include"),
  7. path.join(BGFX_DIR, "include"),
  8. path.join(BGFX_DIR, "3rdparty"),
  9. path.join(BGFX_DIR, "examples/common"),
  10. path.join(MODULE_DIR, "include"),
  11. path.join(MODULE_DIR, "3rdparty"),
  12. path.join(MODULE_DIR, "src"),
  13. }
  14. files {
  15. path.join(MODULE_DIR, "tools/texturev/**"),
  16. }
  17. links {
  18. "example-common",
  19. "bgfx",
  20. "bx",
  21. }
  22. if _OPTIONS["with-sdl"] then
  23. defines { "ENTRY_CONFIG_USE_SDL=1" }
  24. links { "SDL2" }
  25. configuration { "x32", "windows" }
  26. libdirs { "$(SDL2_DIR)/lib/x86" }
  27. configuration { "x64", "windows" }
  28. libdirs { "$(SDL2_DIR)/lib/x64" }
  29. configuration {}
  30. end
  31. if _OPTIONS["with-glfw"] then
  32. defines { "ENTRY_CONFIG_USE_GLFW=1" }
  33. links {
  34. "glfw3"
  35. }
  36. configuration { "linux or freebsd" }
  37. links {
  38. "Xrandr",
  39. "Xinerama",
  40. "Xi",
  41. "Xxf86vm",
  42. "Xcursor",
  43. }
  44. configuration { "osx" }
  45. linkoptions {
  46. "-framework CoreVideo",
  47. "-framework IOKit",
  48. }
  49. configuration {}
  50. end
  51. if _OPTIONS["with-ovr"] then
  52. links {
  53. "winmm",
  54. "ws2_32",
  55. }
  56. -- Check for LibOVR 5.0+
  57. if os.isdir(path.join(os.getenv("OVR_DIR"), "LibOVR/Lib/Windows/Win32/Debug/VS2012")) then
  58. configuration { "x32", "Debug" }
  59. libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/Win32/Debug", _ACTION) }
  60. configuration { "x32", "Release" }
  61. libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/Win32/Release", _ACTION) }
  62. configuration { "x64", "Debug" }
  63. libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/x64/Debug", _ACTION) }
  64. configuration { "x64", "Release" }
  65. libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/x64/Release", _ACTION) }
  66. configuration { "x32 or x64" }
  67. links { "libovr" }
  68. else
  69. configuration { "x32" }
  70. libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Win32", _ACTION) }
  71. configuration { "x64" }
  72. libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/x64", _ACTION) }
  73. configuration { "x32", "Debug" }
  74. links { "libovrd" }
  75. configuration { "x32", "Release" }
  76. links { "libovr" }
  77. configuration { "x64", "Debug" }
  78. links { "libovr64d" }
  79. configuration { "x64", "Release" }
  80. links { "libovr64" }
  81. end
  82. configuration {}
  83. end
  84. configuration { "vs*" }
  85. linkoptions {
  86. "/ignore:4199", -- LNK4199: /DELAYLOAD:*.dll ignored; no imports found from *.dll
  87. }
  88. links { -- this is needed only for testing with GLES2/3 on Windows with VS2008
  89. "DelayImp",
  90. }
  91. configuration { "vs201*" }
  92. linkoptions { -- this is needed only for testing with GLES2/3 on Windows with VS201x
  93. "/DELAYLOAD:\"libEGL.dll\"",
  94. "/DELAYLOAD:\"libGLESv2.dll\"",
  95. }
  96. configuration { "mingw-*" }
  97. targetextension ".exe"
  98. configuration { "vs20* or mingw*" }
  99. links {
  100. "gdi32",
  101. "psapi",
  102. }
  103. configuration { "winphone8*"}
  104. removelinks {
  105. "DelayImp",
  106. "gdi32",
  107. "psapi"
  108. }
  109. links {
  110. "d3d11",
  111. "dxgi"
  112. }
  113. linkoptions {
  114. "/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
  115. }
  116. -- WinRT targets need their own output directories are build files stomp over each other
  117. targetdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "bin", _name))
  118. objdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "obj", _name))
  119. configuration { "mingw-clang" }
  120. kind "ConsoleApp"
  121. configuration { "android*" }
  122. kind "ConsoleApp"
  123. targetextension ".so"
  124. linkoptions {
  125. "-shared",
  126. }
  127. links {
  128. "EGL",
  129. "GLESv2",
  130. }
  131. configuration { "nacl*" }
  132. kind "ConsoleApp"
  133. targetextension ".nexe"
  134. links {
  135. "ppapi",
  136. "ppapi_gles2",
  137. "pthread",
  138. }
  139. configuration { "pnacl" }
  140. kind "ConsoleApp"
  141. targetextension ".pexe"
  142. links {
  143. "ppapi",
  144. "ppapi_gles2",
  145. "pthread",
  146. }
  147. configuration { "asmjs" }
  148. kind "ConsoleApp"
  149. targetextension ".bc"
  150. configuration { "linux-* or freebsd" }
  151. links {
  152. "X11",
  153. "GL",
  154. "pthread",
  155. }
  156. configuration { "rpi" }
  157. links {
  158. "X11",
  159. "GLESv2",
  160. "EGL",
  161. "bcm_host",
  162. "vcos",
  163. "vchiq_arm",
  164. "pthread",
  165. }
  166. configuration { "osx" }
  167. linkoptions {
  168. "-framework Cocoa",
  169. "-framework Metal",
  170. "-framework QuartzCore",
  171. "-framework OpenGL",
  172. }
  173. configuration { "ios*" }
  174. kind "ConsoleApp"
  175. linkoptions {
  176. "-framework CoreFoundation",
  177. "-framework Foundation",
  178. "-framework OpenGLES",
  179. "-framework UIKit",
  180. "-framework QuartzCore",
  181. }
  182. configuration { "xcode4", "ios" }
  183. kind "WindowedApp"
  184. configuration { "qnx*" }
  185. targetextension ""
  186. links {
  187. "EGL",
  188. "GLESv2",
  189. }
  190. configuration {}
  191. strip()