texturev.lua 4.6 KB

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