texturev.lua 4.6 KB

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