CMakeLists.txt 3.7 KB

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