texturev.lua 3.6 KB

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