premake4.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. project "App_BasicExample"
  2. if _OPTIONS["ios"] then
  3. kind "WindowedApp"
  4. else
  5. kind "ConsoleApp"
  6. end
  7. includedirs {"../../src"}
  8. links {
  9. "BulletDynamics","BulletCollision", "LinearMath"
  10. }
  11. language "C++"
  12. files {
  13. "**.cpp",
  14. "**.h",
  15. "../CommonInterfaces/*",
  16. }
  17. project "App_BasicExampleGui"
  18. if _OPTIONS["ios"] then
  19. kind "WindowedApp"
  20. else
  21. kind "ConsoleApp"
  22. end
  23. defines {"B3_USE_STANDALONE_EXAMPLE"}
  24. includedirs {"../../src"}
  25. links {
  26. "BulletDynamics","BulletCollision", "LinearMath", "OpenGL_Window","Bullet3Common"
  27. }
  28. initOpenGL()
  29. initGlew()
  30. language "C++"
  31. files {
  32. "BasicExample.cpp",
  33. "*.h",
  34. "../StandaloneMain/main_opengl_single_example.cpp",
  35. "../ExampleBrowser/OpenGLGuiHelper.cpp",
  36. "../ExampleBrowser/GL_ShapeDrawer.cpp",
  37. "../ExampleBrowser/CollisionShape2TriangleMesh.cpp",
  38. "../CommonInterfaces/*",
  39. "../Utils/b3Clock.cpp",
  40. "../Utils/b3Clock.h",
  41. }
  42. if os.is("Linux") then initX11() end
  43. if os.is("MacOSX") then
  44. links{"Cocoa.framework"}
  45. end
  46. project "App_BasicExampleGuiWithSoftwareRenderer"
  47. if _OPTIONS["ios"] then
  48. kind "WindowedApp"
  49. else
  50. kind "ConsoleApp"
  51. end
  52. defines {"B3_USE_STANDALONE_EXAMPLE"}
  53. includedirs {"../../src"}
  54. links {
  55. "BulletDynamics","BulletCollision", "LinearMath", "OpenGL_Window","Bullet3Common"
  56. }
  57. initOpenGL()
  58. initGlew()
  59. language "C++"
  60. files {
  61. "BasicExample.cpp",
  62. "*.h",
  63. "../StandaloneMain/main_sw_tinyrenderer_single_example.cpp",
  64. "../ExampleBrowser/OpenGLGuiHelper.cpp",
  65. "../ExampleBrowser/GL_ShapeDrawer.cpp",
  66. "../ExampleBrowser/CollisionShape2TriangleMesh.cpp",
  67. "../CommonInterfaces/*",
  68. "../TinyRenderer/geometry.cpp",
  69. "../TinyRenderer/model.cpp",
  70. "../TinyRenderer/tgaimage.cpp",
  71. "../TinyRenderer/our_gl.cpp",
  72. "../TinyRenderer/TinyRenderer.cpp",
  73. "../Utils/b3ResourcePath.cpp",
  74. "../Utils/b3Clock.cpp",
  75. "../Utils/b3Clock.h",
  76. }
  77. if os.is("Linux") then initX11() end
  78. if os.is("MacOSX") then
  79. links{"Cocoa.framework"}
  80. end
  81. project "App_BasicExampleTinyRenderer"
  82. if _OPTIONS["ios"] then
  83. kind "WindowedApp"
  84. else
  85. kind "ConsoleApp"
  86. end
  87. defines {"B3_USE_STANDALONE_EXAMPLE"}
  88. includedirs {"../../src"}
  89. links {
  90. "BulletDynamics","BulletCollision", "LinearMath", "Bullet3Common"
  91. }
  92. language "C++"
  93. files {
  94. "BasicExample.cpp",
  95. "*.h",
  96. "../StandaloneMain/main_tinyrenderer_single_example.cpp",
  97. "../ExampleBrowser/CollisionShape2TriangleMesh.cpp",
  98. "../CommonInterfaces/*",
  99. "../OpenGLWindow/SimpleCamera.cpp",
  100. "../TinyRenderer/geometry.cpp",
  101. "../TinyRenderer/model.cpp",
  102. "../TinyRenderer/tgaimage.cpp",
  103. "../TinyRenderer/our_gl.cpp",
  104. "../TinyRenderer/TinyRenderer.cpp",
  105. "../Utils/b3ResourcePath.cpp",
  106. "../Utils/b3Clock.cpp",
  107. "../Utils/b3Clock.h",
  108. }
  109. if _OPTIONS["enable_openvr"] then
  110. project "App_BasicExampleVR"
  111. if _OPTIONS["ios"] then
  112. kind "WindowedApp"
  113. else
  114. kind "ConsoleApp"
  115. end
  116. defines {"B3_USE_STANDALONE_EXAMPLE","BT_ENABLE_VR"}
  117. includedirs {"../../src",
  118. "../ThirdPartyLibs/openvr/headers",
  119. "../ThirdPartyLibs/openvr/samples/shared"}
  120. links {
  121. "BulletDynamics","BulletCollision", "LinearMath", "OpenGL_Window","Bullet3Common", "openvr_api"
  122. }
  123. initOpenGL()
  124. initGlew()
  125. language "C++"
  126. files {
  127. "BasicExample.cpp",
  128. "*.h",
  129. "../StandaloneMain/hellovr_opengl_main.cpp",
  130. "../CommonInterfaces/*",
  131. "../ExampleBrowser/OpenGLGuiHelper.cpp",
  132. "../ExampleBrowser/GL_ShapeDrawer.cpp",
  133. "../ExampleBrowser/CollisionShape2TriangleMesh.cpp",
  134. "../ThirdPartyLibs/openvr/samples/shared/lodepng.cpp",
  135. "../ThirdPartyLibs/openvr/samples/shared/lodepng.h",
  136. "../ThirdPartyLibs/openvr/samples/shared/Matrices.cpp",
  137. "../ThirdPartyLibs/openvr/samples/shared/Matrices.h",
  138. "../ThirdPartyLibs/openvr/samples/shared/strtools.cpp",
  139. "../ThirdPartyLibs/openvr/samples/shared/pathtools.cpp",
  140. "../ThirdPartyLibs/openvr/samples/shared/pathtools.h",
  141. "../ThirdPartyLibs/openvr/samples/shared/Vectors.h",
  142. "../Utils/b3Clock.cpp",
  143. "../Utils/b3Clock.h",
  144. "../Utils/ChromeTraceUtil.cpp",
  145. "../Utils/ChromeTraceUtil.h",
  146. }
  147. if os.is("Windows") then
  148. libdirs {"../ThirdPartyLibs/openvr/lib/win32"}
  149. end
  150. if os.is("Linux") then initX11() end
  151. if os.is("MacOSX") then
  152. links{"Cocoa.framework"}
  153. end
  154. end