geometryv.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. --
  2. -- Copyright 2010-2024 Branimir Karadzic. All rights reserved.
  3. -- License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
  4. --
  5. project ("geometryv")
  6. uuid (os.uuid("geometryv") )
  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/geometryv/**"),
  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. configuration { "vs*" }
  66. linkoptions {
  67. "/ignore:4199", -- LNK4199: /DELAYLOAD:*.dll ignored; no imports found from *.dll
  68. }
  69. links { -- this is needed only for testing with GLES2/3 on Windows with VS2008
  70. "DelayImp",
  71. }
  72. configuration { "vs201*" }
  73. linkoptions { -- this is needed only for testing with GLES2/3 on Windows with VS201x
  74. "/DELAYLOAD:\"libEGL.dll\"",
  75. "/DELAYLOAD:\"libGLESv2.dll\"",
  76. }
  77. configuration { "mingw-*" }
  78. targetextension ".exe"
  79. configuration { "vs20* or mingw*" }
  80. links {
  81. "comdlg32",
  82. "gdi32",
  83. "psapi",
  84. }
  85. configuration { "winstore*" }
  86. removelinks {
  87. "DelayImp",
  88. "gdi32",
  89. "psapi"
  90. }
  91. links {
  92. "d3d11",
  93. "d3d12",
  94. "dxgi"
  95. }
  96. linkoptions {
  97. "/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
  98. }
  99. -- WinRT targets need their own output directories are build files stomp over each other
  100. targetdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "bin", _name))
  101. objdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "obj", _name))
  102. configuration { "mingw-clang" }
  103. kind "ConsoleApp"
  104. configuration { "android*" }
  105. kind "ConsoleApp"
  106. targetextension ".so"
  107. linkoptions {
  108. "-shared",
  109. }
  110. links {
  111. "EGL",
  112. "GLESv2",
  113. }
  114. configuration { "wasm*" }
  115. kind "ConsoleApp"
  116. configuration { "linux-* or freebsd" }
  117. links {
  118. "X11",
  119. "GL",
  120. "pthread",
  121. }
  122. configuration { "rpi" }
  123. links {
  124. "X11",
  125. "GLESv2",
  126. "EGL",
  127. "bcm_host",
  128. "vcos",
  129. "vchiq_arm",
  130. "pthread",
  131. }
  132. configuration { "osx*" }
  133. linkoptions {
  134. "-framework Cocoa",
  135. "-framework IOKit",
  136. "-framework Metal",
  137. "-framework OpenGL",
  138. "-framework QuartzCore",
  139. }
  140. configuration { "ios*" }
  141. kind "ConsoleApp"
  142. linkoptions {
  143. "-framework CoreFoundation",
  144. "-framework Foundation",
  145. "-framework IOKit",
  146. "-framework OpenGLES",
  147. "-framework QuartzCore",
  148. "-framework UIKit",
  149. }
  150. configuration { "xcode4", "ios" }
  151. kind "WindowedApp"
  152. configuration { "qnx*" }
  153. targetextension ""
  154. links {
  155. "EGL",
  156. "GLESv2",
  157. }
  158. configuration {}
  159. strip()