CMakeLists.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. set(VCAI_SRCS
  2. StdInc.cpp
  3. Pathfinding/AIPathfinderConfig.cpp
  4. Pathfinding/AIPathfinder.cpp
  5. Pathfinding/AINodeStorage.cpp
  6. Pathfinding/Actors.cpp
  7. Pathfinding/Actions/SpecialAction.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. Analyzers/ArmyManager.cpp
  17. Analyzers/HeroManager.cpp
  18. Engine/FuzzyEngines.cpp
  19. Engine/FuzzyHelper.cpp
  20. Engine/AIMemory.cpp
  21. Goals/AbstractGoal.cpp
  22. Goals/Composition.cpp
  23. Goals/BuildBoat.cpp
  24. Goals/BuildThis.cpp
  25. Goals/DismissHero.cpp
  26. Goals/BuyArmy.cpp
  27. Goals/AdventureSpellCast.cpp
  28. Goals/Trade.cpp
  29. Goals/RecruitHero.cpp
  30. Goals/DigAtTile.cpp
  31. Goals/ExecuteHeroChain.cpp
  32. Goals/ExchangeSwapTownHeroes.cpp
  33. Goals/CompleteQuest.cpp
  34. Markers/ArmyUpgrade.cpp
  35. Markers/HeroExchange.cpp
  36. Markers/UnlockCluster.cpp
  37. Engine/Nullkiller.cpp
  38. Engine/DeepDecomposer.cpp
  39. Engine/PriorityEvaluator.cpp
  40. Analyzers/DangerHitMapAnalyzer.cpp
  41. Analyzers/BuildAnalyzer.cpp
  42. Analyzers/ObjectClusterizer.cpp
  43. Behaviors/CaptureObjectsBehavior.cpp
  44. Behaviors/RecruitHeroBehavior.cpp
  45. Behaviors/BuyArmyBehavior.cpp
  46. Behaviors/DefenceBehavior.cpp
  47. Behaviors/StartupBehavior.cpp
  48. Behaviors/BuildingBehavior.cpp
  49. Behaviors/GatherArmyBehavior.cpp
  50. Behaviors/ClusterBehavior.cpp
  51. main.cpp
  52. VCAI.cpp
  53. )
  54. set(VCAI_HEADERS
  55. StdInc.h
  56. Pathfinding/AIPathfinderConfig.h
  57. Pathfinding/AIPathfinder.h
  58. Pathfinding/AINodeStorage.h
  59. Pathfinding/Actors.h
  60. Pathfinding/Actions/SpecialAction.h
  61. Pathfinding/Actions/BattleAction.h
  62. Pathfinding/Actions/BoatActions.h
  63. Pathfinding/Actions/TownPortalAction.h
  64. Pathfinding/Rules/AILayerTransitionRule.h
  65. Pathfinding/Rules/AIMovementAfterDestinationRule.h
  66. Pathfinding/Rules/AIMovementToDestinationRule.h
  67. Pathfinding/Rules/AIPreviousNodeRule.h
  68. AIUtility.h
  69. Analyzers/ArmyManager.h
  70. Analyzers/HeroManager.h
  71. Engine/FuzzyEngines.h
  72. Engine/FuzzyHelper.h
  73. Engine/AIMemory.h
  74. Goals/AbstractGoal.h
  75. Goals/CGoal.h
  76. Goals/Composition.h
  77. Goals/Invalid.h
  78. Goals/BuildBoat.h
  79. Goals/BuildThis.h
  80. Goals/DismissHero.h
  81. Goals/BuyArmy.h
  82. Goals/AdventureSpellCast.h
  83. Goals/Trade.h
  84. Goals/RecruitHero.h
  85. Goals/DigAtTile.h
  86. Goals/ExecuteHeroChain.h
  87. Goals/ExchangeSwapTownHeroes.h
  88. Goals/CompleteQuest.h
  89. Goals/Goals.h
  90. Markers/ArmyUpgrade.h
  91. Markers/HeroExchange.h
  92. Markers/UnlockCluster.h
  93. Engine/Nullkiller.h
  94. Engine/DeepDecomposer.h
  95. Engine/PriorityEvaluator.h
  96. Analyzers/DangerHitMapAnalyzer.h
  97. Analyzers/BuildAnalyzer.h
  98. Analyzers/ObjectClusterizer.h
  99. Behaviors/CaptureObjectsBehavior.h
  100. Behaviors/RecruitHeroBehavior.h
  101. Behaviors/BuyArmyBehavior.h
  102. Behaviors/DefenceBehavior.h
  103. Behaviors/StartupBehavior.h
  104. Behaviors/BuildingBehavior.h
  105. Behaviors/GatherArmyBehavior.h
  106. Behaviors/ClusterBehavior.h
  107. VCAI.h
  108. )
  109. assign_source_group(${VCAI_SRCS} ${VCAI_HEADERS})
  110. if(ANDROID) # android compiles ai libs into main lib directly, so we skip this library and just reuse sources list
  111. return()
  112. endif()
  113. add_library(VCAI SHARED ${VCAI_SRCS} ${VCAI_HEADERS})
  114. if(FL_FOUND)
  115. target_include_directories(VCAI PUBLIC ${FL_INCLUDE_DIRS})
  116. else()
  117. target_include_directories(VCAI PUBLIC ${CMAKE_HOME_DIRECTORY}/AI/FuzzyLite/fuzzylite)
  118. endif()
  119. target_include_directories(VCAI PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
  120. if(FL_FOUND)
  121. target_link_libraries(VCAI PRIVATE ${FL_LIBRARIES} vcmi)
  122. else()
  123. target_link_libraries(VCAI PRIVATE fl-static vcmi)
  124. endif()
  125. vcmi_set_output_dir(VCAI "AI")
  126. set_target_properties(VCAI PROPERTIES ${PCH_PROPERTIES})
  127. cotire(VCAI)
  128. install(TARGETS VCAI RUNTIME DESTINATION ${AI_LIB_DIR} LIBRARY DESTINATION ${AI_LIB_DIR})