CMakeLists.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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/Actions/BattleAction.cpp
  14. Pathfinding/Actions/BoatActions.cpp
  15. Pathfinding/Actions/TownPortalAction.cpp
  16. Pathfinding/Rules/AILayerTransitionRule.cpp
  17. Pathfinding/Rules/AIMovementAfterDestinationRule.cpp
  18. Pathfinding/Rules/AIMovementToDestinationRule.cpp
  19. Pathfinding/Rules/AIPreviousNodeRule.cpp
  20. AIUtility.cpp
  21. AIhelper.cpp
  22. ResourceManager.cpp
  23. BuildingManager.cpp
  24. SectorMap.cpp
  25. BuildingManager.cpp
  26. MapObjectsEvaluator.cpp
  27. FuzzyEngines.cpp
  28. FuzzyHelper.cpp
  29. Goals/AbstractGoal.cpp
  30. Goals/BuildBoat.cpp
  31. Goals/Build.cpp
  32. Goals/BuildThis.cpp
  33. Goals/Explore.cpp
  34. Goals/GatherArmy.cpp
  35. Goals/GatherTroops.cpp
  36. Goals/BuyArmy.cpp
  37. Goals/AdventureSpellCast.cpp
  38. Goals/Win.cpp
  39. Goals/VisitTile.cpp
  40. Goals/VisitObj.cpp
  41. Goals/VisitHero.cpp
  42. Goals/CollectRes.cpp
  43. Goals/Trade.cpp
  44. Goals/RecruitHero.cpp
  45. Goals/Conquer.cpp
  46. Goals/ClearWayTo.cpp
  47. Goals/DigAtTile.cpp
  48. Goals/GetArtOfType.cpp
  49. Goals/FindObj.cpp
  50. Goals/CompleteQuest.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/PathfindingManager.h
  60. Pathfinding/Actions/ISpecialAction.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. AIhelper.h
  70. ResourceManager.h
  71. BuildingManager.h
  72. SectorMap.h
  73. BuildingManager.h
  74. MapObjectsEvaluator.h
  75. FuzzyEngines.h
  76. FuzzyHelper.h
  77. Goals/AbstractGoal.h
  78. Goals/CGoal.h
  79. Goals/Invalid.h
  80. Goals/BuildBoat.h
  81. Goals/Build.h
  82. Goals/BuildThis.h
  83. Goals/Explore.h
  84. Goals/GatherArmy.h
  85. Goals/GatherTroops.h
  86. Goals/BuyArmy.h
  87. Goals/AdventureSpellCast.h
  88. Goals/Win.h
  89. Goals/VisitTile.h
  90. Goals/VisitObj.h
  91. Goals/VisitHero.h
  92. Goals/CollectRes.h
  93. Goals/Trade.h
  94. Goals/RecruitHero.h
  95. Goals/Conquer.h
  96. Goals/ClearWayTo.h
  97. Goals/DigAtTile.h
  98. Goals/GetArtOfType.h
  99. Goals/FindObj.h
  100. Goals/CompleteQuest.h
  101. Goals/Goals.h
  102. VCAI.h
  103. )
  104. assign_source_group(${VCAI_SRCS} ${VCAI_HEADERS})
  105. if(ANDROID) # android compiles ai libs into main lib directly, so we skip this library and just reuse sources list
  106. return()
  107. endif()
  108. add_library(VCAI SHARED ${VCAI_SRCS} ${VCAI_HEADERS})
  109. if(FL_FOUND)
  110. target_link_libraries(VCAI ${FL_LIBRARIES} vcmi)
  111. else()
  112. target_link_libraries(VCAI fl-static vcmi)
  113. endif()
  114. vcmi_set_output_dir(VCAI "AI")
  115. set_target_properties(VCAI PROPERTIES ${PCH_PROPERTIES})
  116. cotire(VCAI)
  117. install(TARGETS VCAI RUNTIME DESTINATION ${AI_LIB_DIR} LIBRARY DESTINATION ${AI_LIB_DIR})