texturev.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. project ("texturev")
  2. uuid (os.uuid("texturev") )
  3. kind "ConsoleApp"
  4. configuration {}
  5. includedirs {
  6. path.join(BIMG_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. }
  13. files {
  14. path.join(MODULE_DIR, "tools/texturev/**"),
  15. }
  16. links {
  17. "example-common",
  18. "bimg_decode",
  19. "bimg",
  20. "bgfx",
  21. }
  22. using_bx()
  23. if _OPTIONS["with-sdl"] then
  24. defines { "ENTRY_CONFIG_USE_SDL=1" }
  25. links { "SDL2" }
  26. configuration { "linux or freebsd" }
  27. if _OPTIONS["with-wayland"] then
  28. links {
  29. "wayland-egl",
  30. }
  31. end
  32. configuration { "x32", "windows" }
  33. libdirs { "$(SDL2_DIR)/lib/x86" }
  34. configuration { "x64", "windows" }
  35. libdirs { "$(SDL2_DIR)/lib/x64" }
  36. configuration {}
  37. end
  38. if _OPTIONS["with-glfw"] then
  39. defines { "ENTRY_CONFIG_USE_GLFW=1" }
  40. links { "glfw3" }
  41. configuration { "linux or freebsd" }
  42. if _OPTIONS["with-wayland"] then
  43. links {
  44. "wayland-egl",
  45. }
  46. else
  47. links {
  48. "Xrandr",
  49. "Xinerama",
  50. "Xi",
  51. "Xxf86vm",
  52. "Xcursor",
  53. }
  54. end
  55. configuration { "osx*" }
  56. linkoptions {
  57. "-framework CoreVideo",
  58. }
  59. configuration {}
  60. end
  61. configuration { "vs*" }
  62. linkoptions {
  63. "/ignore:4199", -- LNK4199: /DELAYLOAD:*.dll ignored; no imports found from *.dll
  64. }
  65. links { -- this is needed only for testing with GLES2/3 on Windows with VS2008
  66. "DelayImp",
  67. }
  68. configuration { "vs201*" }
  69. linkoptions { -- this is needed only for testing with GLES2/3 on Windows with VS201x
  70. "/DELAYLOAD:\"libEGL.dll\"",
  71. "/DELAYLOAD:\"libGLESv2.dll\"",
  72. }
  73. configuration { "mingw-*" }
  74. targetextension ".exe"
  75. configuration { "vs20* or mingw*" }
  76. links {
  77. "comdlg32",
  78. "gdi32",
  79. "psapi",
  80. }
  81. configuration { "winstore*" }
  82. removelinks {
  83. "DelayImp",
  84. "gdi32",
  85. "psapi"
  86. }
  87. links {
  88. "d3d11",
  89. "d3d12",
  90. "dxgi"
  91. }
  92. linkoptions {
  93. "/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
  94. }
  95. -- WinRT targets need their own output directories are build files stomp over each other
  96. targetdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "bin", _name))
  97. objdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "obj", _name))
  98. configuration { "mingw-clang" }
  99. kind "ConsoleApp"
  100. configuration { "android*" }
  101. kind "ConsoleApp"
  102. targetextension ".so"
  103. linkoptions {
  104. "-shared",
  105. }
  106. links {
  107. "EGL",
  108. "GLESv2",
  109. }
  110. configuration { "wasm*" }
  111. kind "ConsoleApp"
  112. configuration { "linux-* or freebsd" }
  113. links {
  114. "X11",
  115. "GL",
  116. "pthread",
  117. }
  118. configuration { "rpi" }
  119. links {
  120. "X11",
  121. "GLESv2",
  122. "EGL",
  123. "bcm_host",
  124. "vcos",
  125. "vchiq_arm",
  126. "pthread",
  127. }
  128. configuration { "osx*" }
  129. linkoptions {
  130. "-framework Cocoa",
  131. "-framework IOKit",
  132. "-framework Metal",
  133. "-framework OpenGL",
  134. "-framework QuartzCore",
  135. }
  136. configuration { "ios*" }
  137. kind "ConsoleApp"
  138. linkoptions {
  139. "-framework CoreFoundation",
  140. "-framework Foundation",
  141. "-framework IOKit",
  142. "-framework OpenGLES",
  143. "-framework QuartzCore",
  144. "-framework UIKit",
  145. }
  146. configuration { "xcode*", "ios" }
  147. kind "WindowedApp"
  148. configuration { "qnx*" }
  149. targetextension ""
  150. links {
  151. "EGL",
  152. "GLESv2",
  153. }
  154. configuration {}
  155. strip()