CMakeLists.txt 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. if(FL_FOUND)
  2. include_directories(${FL_INCLUDE_DIRS})
  3. else()
  4. include_directories(${CMAKE_HOME_DIRECTORY}/AI/FuzzyLite/fuzzylite)
  5. endif()
  6. include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
  7. set(VCAI_SRCS
  8. StdInc.cpp
  9. Pathfinding/AIPathfinderConfig.cpp
  10. Pathfinding/AIPathfinder.cpp
  11. Pathfinding/AINodeStorage.cpp
  12. Pathfinding/PathfindingManager.cpp
  13. Pathfinding/Actors.cpp
  14. Pathfinding/Actions/BattleAction.cpp
  15. Pathfinding/Actions/BoatActions.cpp
  16. Pathfinding/Actions/TownPortalAction.cpp
  17. Pathfinding/Rules/AILayerTransitionRule.cpp
  18. Pathfinding/Rules/AIMovementAfterDestinationRule.cpp
  19. Pathfinding/Rules/AIMovementToDestinationRule.cpp
  20. Pathfinding/Rules/AIPreviousNodeRule.cpp
  21. Pathfinding/Rules/AIMovementCostRule.cpp
  22. AIUtility.cpp
  23. AIhelper.cpp
  24. ResourceManager.cpp
  25. BuildingManager.cpp
  26. SectorMap.cpp
  27. BuildingManager.cpp
  28. MapObjectsEvaluator.cpp
  29. FuzzyEngines.cpp
  30. FuzzyHelper.cpp
  31. Goals/AbstractGoal.cpp
  32. Goals/BuildBoat.cpp
  33. Goals/Build.cpp
  34. Goals/BuildThis.cpp
  35. Goals/Explore.cpp
  36. Goals/GatherArmy.cpp
  37. Goals/GatherTroops.cpp
  38. Goals/BuyArmy.cpp
  39. Goals/AdventureSpellCast.cpp
  40. Goals/Win.cpp
  41. Goals/VisitTile.cpp
  42. Goals/VisitObj.cpp
  43. Goals/VisitHero.cpp
  44. Goals/CollectRes.cpp
  45. Goals/Trade.cpp
  46. Goals/RecruitHero.cpp
  47. Goals/Conquer.cpp
  48. Goals/ClearWayTo.cpp
  49. Goals/DigAtTile.cpp
  50. Goals/GetArtOfType.cpp
  51. Goals/FindObj.cpp
  52. Goals/CompleteQuest.cpp
  53. Engine/Nullkiller.cpp
  54. Engine/PriorityEvaluator.cpp
  55. Behaviors/Behavior.cpp
  56. Behaviors/CaptureObjectsBehavior.cpp
  57. Behaviors/RecruitHeroBehavior.cpp
  58. main.cpp
  59. VCAI.cpp
  60. )
  61. set(VCAI_HEADERS
  62. StdInc.h
  63. Pathfinding/AIPathfinderConfig.h
  64. Pathfinding/AIPathfinder.h
  65. Pathfinding/AINodeStorage.h
  66. Pathfinding/PathfindingManager.h
  67. Pathfinding/Actors.h
  68. Pathfinding/Actions/ISpecialAction.h
  69. Pathfinding/Actions/BattleAction.h
  70. Pathfinding/Actions/BoatActions.h
  71. Pathfinding/Actions/TownPortalAction.h
  72. Pathfinding/Rules/AILayerTransitionRule.h
  73. Pathfinding/Rules/AIMovementAfterDestinationRule.h
  74. Pathfinding/Rules/AIMovementToDestinationRule.h
  75. Pathfinding/Rules/AIPreviousNodeRule.h
  76. Pathfinding/Rules/AIMovementCostRule.h
  77. AIUtility.h
  78. AIhelper.h
  79. ResourceManager.h
  80. BuildingManager.h
  81. SectorMap.h
  82. BuildingManager.h
  83. MapObjectsEvaluator.h
  84. FuzzyEngines.h
  85. FuzzyHelper.h
  86. Goals/AbstractGoal.h
  87. Goals/CGoal.h
  88. Goals/Invalid.h
  89. Goals/BuildBoat.h
  90. Goals/Build.h
  91. Goals/BuildThis.h
  92. Goals/Explore.h
  93. Goals/GatherArmy.h
  94. Goals/GatherTroops.h
  95. Goals/BuyArmy.h
  96. Goals/AdventureSpellCast.h
  97. Goals/Win.h
  98. Goals/VisitTile.h
  99. Goals/VisitObj.h
  100. Goals/VisitHero.h
  101. Goals/CollectRes.h
  102. Goals/Trade.h
  103. Goals/RecruitHero.h
  104. Goals/Conquer.h
  105. Goals/ClearWayTo.h
  106. Goals/DigAtTile.h
  107. Goals/GetArtOfType.h
  108. Goals/FindObj.h
  109. Goals/CompleteQuest.h
  110. Goals/Goals.h
  111. Engine/Nullkiller.h
  112. Engine/PriorityEvaluator.h
  113. Behaviors/Behavior.h
  114. Behaviors/CaptureObjectsBehavior.h
  115. Behaviors/RecruitHeroBehavior.h
  116. VCAI.h
  117. )
  118. assign_source_group(${VCAI_SRCS} ${VCAI_HEADERS})
  119. if(ANDROID) # android compiles ai libs into main lib directly, so we skip this library and just reuse sources list
  120. return()
  121. endif()
  122. add_library(VCAI SHARED ${VCAI_SRCS} ${VCAI_HEADERS})
  123. if(FL_FOUND)
  124. target_link_libraries(VCAI ${FL_LIBRARIES} vcmi)
  125. else()
  126. target_link_libraries(VCAI fl-static vcmi)
  127. endif()
  128. vcmi_set_output_dir(VCAI "AI")
  129. set_target_properties(VCAI PROPERTIES ${PCH_PROPERTIES})
  130. cotire(VCAI)
  131. install(TARGETS VCAI RUNTIME DESTINATION ${AI_LIB_DIR} LIBRARY DESTINATION ${AI_LIB_DIR})