geometryv.lua 3.2 KB

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