CMakeLists.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #
  2. # Copyright (c) 2008-2015 the Urho3D project.
  3. #
  4. # Permission is hereby granted, free of charge, to any person obtaining a copy
  5. # of this software and associated documentation files (the "Software"), to deal
  6. # in the Software without restriction, including without limitation the rights
  7. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. # copies of the Software, and to permit persons to whom the Software is
  9. # furnished to do so, subject to the following conditions:
  10. #
  11. # The above copyright notice and this permission notice shall be included in
  12. # all copies or substantial portions of the Software.
  13. #
  14. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. # THE SOFTWARE.
  21. #
  22. # Set project name
  23. project (Urho3D-Samples)
  24. # Find Urho3D library
  25. find_package (Urho3D REQUIRED)
  26. include_directories (${URHO3D_INCLUDE_DIRS})
  27. # Include common to all samples
  28. set (COMMON_SAMPLE_H_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Sample.h" "${CMAKE_CURRENT_SOURCE_DIR}/Sample.inl")
  29. # Define dependency libs
  30. set (INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
  31. # Macro for adding sample subdirectory
  32. macro (add_sample_subdirectory SOURCE_DIR)
  33. if (NOT DEFINED ENV{EXCLUDE_SAMPLE_${SOURCE_DIR}})
  34. add_subdirectory (${SOURCE_DIR} ${ARGN})
  35. endif ()
  36. endmacro ()
  37. # Add samples
  38. add_sample_subdirectory (01_HelloWorld)
  39. add_sample_subdirectory (02_HelloGUI)
  40. add_sample_subdirectory (03_Sprites)
  41. add_sample_subdirectory (04_StaticScene)
  42. add_sample_subdirectory (05_AnimatingScene)
  43. add_sample_subdirectory (06_SkeletalAnimation)
  44. add_sample_subdirectory (07_Billboards)
  45. add_sample_subdirectory (08_Decals)
  46. add_sample_subdirectory (09_MultipleViewports)
  47. add_sample_subdirectory (10_RenderToTexture)
  48. add_sample_subdirectory (14_SoundEffects)
  49. add_sample_subdirectory (20_HugeObjectCount)
  50. add_sample_subdirectory (23_Water)
  51. add_sample_subdirectory (26_ConsoleInput)
  52. add_sample_subdirectory (29_SoundSynthesis)
  53. add_sample_subdirectory (30_LightAnimation)
  54. add_sample_subdirectory (31_MaterialAnimation)
  55. add_sample_subdirectory (34_DynamicGeometry)
  56. add_sample_subdirectory (35_SignedDistanceFieldText)
  57. add_sample_subdirectory (37_UIDrag)
  58. add_sample_subdirectory (38_SceneAndUILoad)
  59. if (URHO3D_PHYSICS)
  60. add_sample_subdirectory (11_Physics)
  61. add_sample_subdirectory (12_PhysicsStressTest)
  62. add_sample_subdirectory (13_Ragdolls)
  63. add_sample_subdirectory (18_CharacterDemo)
  64. add_sample_subdirectory (19_VehicleDemo)
  65. endif ()
  66. if (URHO3D_NAVIGATION)
  67. add_sample_subdirectory (15_Navigation)
  68. add_sample_subdirectory (39_CrowdNavigation)
  69. endif ()
  70. if (URHO3D_NETWORK)
  71. add_sample_subdirectory (16_Chat)
  72. endif ()
  73. if (URHO3D_NETWORK AND URHO3D_PHYSICS)
  74. add_sample_subdirectory (17_SceneReplication)
  75. endif ()
  76. if (URHO3D_ANGELSCRIPT)
  77. add_sample_subdirectory (21_AngelScriptIntegration)
  78. endif ()
  79. if (URHO3D_LUA)
  80. add_sample_subdirectory (22_LuaIntegration)
  81. endif ()
  82. if (URHO3D_URHO2D)
  83. add_sample_subdirectory (24_Urho2DSprite)
  84. add_sample_subdirectory (25_Urho2DParticle)
  85. add_sample_subdirectory (27_Urho2DPhysics)
  86. add_sample_subdirectory (28_Urho2DPhysicsRope)
  87. add_sample_subdirectory (32_Urho2DConstraints)
  88. add_sample_subdirectory (33_Urho2DSpriterAnimation)
  89. add_sample_subdirectory (36_Urho2DTileMap)
  90. endif ()