CMakeLists.txt 3.9 KB

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