texturev.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. links {
  43. "Xrandr",
  44. "Xinerama",
  45. "Xi",
  46. "Xxf86vm",
  47. "Xcursor",
  48. }
  49. configuration { "osx*" }
  50. linkoptions {
  51. "-framework CoreVideo",
  52. }
  53. configuration {}
  54. end
  55. configuration { "vs*" }
  56. linkoptions {
  57. "/ignore:4199", -- LNK4199: /DELAYLOAD:*.dll ignored; no imports found from *.dll
  58. }
  59. links { -- this is needed only for testing with GLES2/3 on Windows with VS2008
  60. "DelayImp",
  61. }
  62. configuration { "vs201*" }
  63. linkoptions { -- this is needed only for testing with GLES2/3 on Windows with VS201x
  64. "/DELAYLOAD:\"libEGL.dll\"",
  65. "/DELAYLOAD:\"libGLESv2.dll\"",
  66. }
  67. configuration { "mingw-*" }
  68. targetextension ".exe"
  69. configuration { "vs20* or mingw*" }
  70. links {
  71. "comdlg32",
  72. "gdi32",
  73. "psapi",
  74. }
  75. configuration { "winstore*" }
  76. removelinks {
  77. "DelayImp",
  78. "gdi32",
  79. "psapi"
  80. }
  81. links {
  82. "d3d11",
  83. "d3d12",
  84. "dxgi"
  85. }
  86. linkoptions {
  87. "/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
  88. }
  89. -- WinRT targets need their own output directories are build files stomp over each other
  90. targetdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "bin", _name))
  91. objdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "obj", _name))
  92. configuration { "mingw-clang" }
  93. kind "ConsoleApp"
  94. configuration { "android*" }
  95. kind "ConsoleApp"
  96. targetextension ".so"
  97. linkoptions {
  98. "-shared",
  99. }
  100. links {
  101. "EGL",
  102. "GLESv2",
  103. }
  104. configuration { "wasm*" }
  105. kind "ConsoleApp"
  106. configuration { "linux-* or freebsd" }
  107. links {
  108. "X11",
  109. "GL",
  110. "pthread",
  111. }
  112. configuration { "rpi" }
  113. links {
  114. "X11",
  115. "GLESv2",
  116. "EGL",
  117. "bcm_host",
  118. "vcos",
  119. "vchiq_arm",
  120. "pthread",
  121. }
  122. configuration { "osx*" }
  123. linkoptions {
  124. "-framework Cocoa",
  125. "-framework IOKit",
  126. "-framework Metal",
  127. "-framework OpenGL",
  128. "-framework QuartzCore",
  129. }
  130. configuration { "ios*" }
  131. kind "ConsoleApp"
  132. linkoptions {
  133. "-framework CoreFoundation",
  134. "-framework Foundation",
  135. "-framework IOKit",
  136. "-framework OpenGLES",
  137. "-framework QuartzCore",
  138. "-framework UIKit",
  139. }
  140. configuration { "xcode*", "ios" }
  141. kind "WindowedApp"
  142. configuration { "qnx*" }
  143. targetextension ""
  144. links {
  145. "EGL",
  146. "GLESv2",
  147. }
  148. configuration {}
  149. strip()