File: CMakeLists.txt

package info (click to toggle)
vcmi 0.99%2Bdfsg%2Bgit20190113.f06c8a87-2
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye
  • size: 11,136 kB
  • sloc: cpp: 142,615; sh: 315; objc: 248; makefile: 32; ansic: 28; python: 13
file content (112 lines) | stat: -rw-r--r-- 2,527 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
if(FL_FOUND)
	include_directories(${FL_INCLUDE_DIRS})
else()
	include_directories(${CMAKE_HOME_DIRECTORY}/AI/FuzzyLite/fuzzylite)
endif()
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)

set(VCAI_SRCS
		StdInc.cpp

		Pathfinding/AIPathfinderConfig.cpp
		Pathfinding/AIPathfinder.cpp
		Pathfinding/AINodeStorage.cpp
		Pathfinding/PathfindingManager.cpp
		AIUtility.cpp
		AIhelper.cpp
		ResourceManager.cpp
		BuildingManager.cpp
		SectorMap.cpp
		BuildingManager.cpp
		MapObjectsEvaluator.cpp
		FuzzyEngines.cpp
		FuzzyHelper.cpp
		Goals/AbstractGoal.cpp
		Goals/BuildBoat.cpp
		Goals/Build.cpp
		Goals/BuildThis.cpp
		Goals/Explore.cpp
		Goals/GatherArmy.cpp
		Goals/GatherTroops.cpp
		Goals/BuyArmy.cpp
		Goals/AdventureSpellCast.cpp
		Goals/Win.cpp
		Goals/VisitTile.cpp
		Goals/VisitObj.cpp
		Goals/VisitHero.cpp
		Goals/CollectRes.cpp
		Goals/Trade.cpp
		Goals/RecruitHero.cpp
		Goals/Conquer.cpp
		Goals/ClearWayTo.cpp
		Goals/DigAtTile.cpp
		Goals/GetArtOfType.cpp
		Goals/FindObj.cpp
		Goals/CompleteQuest.cpp
		main.cpp
		VCAI.cpp
)

set(VCAI_HEADERS
		StdInc.h
		
		Pathfinding/AIPathfinderConfig.h
		Pathfinding/AIPathfinder.h
		Pathfinding/AINodeStorage.h
		Pathfinding/PathfindingManager.h
		AIUtility.h
		AIhelper.h
		ResourceManager.h
		BuildingManager.h
		SectorMap.h
		BuildingManager.h
		MapObjectsEvaluator.h
		FuzzyEngines.h
		FuzzyHelper.h
		Goals/AbstractGoal.h
		Goals/CGoal.h
		Goals/Invalid.h
		Goals/BuildBoat.h
		Goals/Build.h
		Goals/BuildThis.h
		Goals/Explore.h
		Goals/GatherArmy.h
		Goals/GatherTroops.h
		Goals/BuyArmy.h
		Goals/AdventureSpellCast.h
		Goals/Win.h
		Goals/VisitTile.h
		Goals/VisitObj.h
		Goals/VisitHero.h
		Goals/CollectRes.h
		Goals/Trade.h
		Goals/RecruitHero.h
		Goals/Conquer.h
		Goals/ClearWayTo.h
		Goals/DigAtTile.h
		Goals/GetArtOfType.h
		Goals/FindObj.h
		Goals/CompleteQuest.h
		Goals/Goals.h
		VCAI.h
)

assign_source_group(${VCAI_SRCS} ${VCAI_HEADERS})

if(ANDROID) # android compiles ai libs into main lib directly, so we skip this library and just reuse sources list
	return()
endif()

add_library(VCAI SHARED ${VCAI_SRCS} ${VCAI_HEADERS})
if(FL_FOUND)
	target_link_libraries(VCAI ${FL_LIBRARIES} vcmi)
else()
	target_link_libraries(VCAI fl-static vcmi)
endif()

vcmi_set_output_dir(VCAI "AI")

set_target_properties(VCAI PROPERTIES ${PCH_PROPERTIES})
cotire(VCAI)

install(TARGETS VCAI RUNTIME DESTINATION ${AI_LIB_DIR} LIBRARY DESTINATION ${AI_LIB_DIR})