premake4.lua 4.0 KB

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