blob: b14576ea098a345c0caf25e48926c532e3fcd44f (
plain) (
blame)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
cmake_minimum_required (VERSION 2.6)
project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
include_directories (".")
SET (SRCS
Bindings.cpp
DeprecatedBindings.cpp
LuaChunkStay.cpp
LuaNameLookup.cpp
LuaServerHandle.cpp
LuaState.cpp
LuaState_Implementation.cpp
LuaTCPLink.cpp
LuaUDPEndpoint.cpp
LuaWindow.cpp
ManualBindings.cpp
ManualBindings_Network.cpp
ManualBindings_RankManager.cpp
ManualBindings_World.cpp
Plugin.cpp
PluginLua.cpp
PluginManager.cpp
WebPlugin.cpp
)
SET (HDRS
Bindings.h
DeprecatedBindings.h
LuaChunkStay.h
LuaFunctions.h
LuaNameLookup.h
LuaServerHandle.h
LuaState.h
LuaState_Declaration.inc
LuaState_Typedefs.inc
LuaTCPLink.h
LuaUDPEndpoint.h
LuaWindow.h
ManualBindings.h
Plugin.h
PluginLua.h
PluginManager.h
WebPlugin.h
tolua++.h
)
# List all the files that are generated as part of the Bindings build process
set (BINDING_OUTPUTS
${CMAKE_CURRENT_SOURCE_DIR}/Bindings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Bindings.h
${CMAKE_CURRENT_SOURCE_DIR}/LuaState_Declaration.inc
${CMAKE_CURRENT_SOURCE_DIR}/LuaState_Implementation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/LuaState_Typedefs.inc
)
set(BINDING_DEPENDENCIES
tolua
../Bindings/AllToLua.pkg
../Bindings/BindingsProcessor.lua
../Bindings/LuaFunctions.h
../Bindings/LuaWindow.h
../Bindings/Plugin.h
../Bindings/PluginLua.h
../Bindings/PluginManager.h
../Bindings/WebPlugin.h
../BiomeDef.h
../BlockArea.h
../BlockEntities/BeaconEntity.h
../BlockEntities/BlockEntity.h
../BlockEntities/BlockEntityWithItems.h
../BlockEntities/ChestEntity.h
../BlockEntities/DispenserEntity.h
../BlockEntities/DropSpenserEntity.h
../BlockEntities/DropperEntity.h
../BlockEntities/FurnaceEntity.h
../BlockEntities/HopperEntity.h
../BlockEntities/JukeboxEntity.h
../BlockEntities/NoteEntity.h
../BlockEntities/SignEntity.h
../BlockEntities/MobHeadEntity.h
../BlockEntities/FlowerPotEntity.h
../BlockID.h
../BoundingBox.h
../ChatColor.h
../ChunkDef.h
../ClientHandle.h
../CraftingRecipes.h
../Cuboid.h
../Defines.h
../Enchantments.h
../Entities/ArrowEntity.h
../Entities/Entity.h
../Entities/EntityEffect.h
../Entities/ExpBottleEntity.h
../Entities/FireChargeEntity.h
../Entities/FireworkEntity.h
../Entities/Floater.h
../Entities/GhastFireballEntity.h
../Entities/HangingEntity.h
../Entities/ItemFrame.h
../Entities/Pawn.h
../Entities/Player.h
../Entities/Painting.h
../Entities/Pickup.h
../Entities/ProjectileEntity.h
../Entities/SplashPotionEntity.h
../Entities/ThrownEggEntity.h
../Entities/ThrownEnderPearlEntity.h
../Entities/ThrownSnowballEntity.h
../Entities/TNTEntity.h
../Entities/WitherSkullEntity.h
../Generating/ChunkDesc.h
../Inventory.h
../Item.h
../ItemGrid.h
../Mobs/Monster.h
../OSSupport/File.h
../Root.h
../Server.h
../StringUtils.h
../Tracer.h
../UI/Window.h
../Vector3.h
../WebAdmin.h
../World.h
)
if (NOT MSVC)
ADD_CUSTOM_COMMAND(
# add any new generated bindings here
OUTPUT ${BINDING_OUTPUTS}
# Regenerate bindings:
COMMAND tolua -L BindingsProcessor.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
# add any new generation dependencies here
DEPENDS ${BINDING_DEPENDENCIES}
)
endif ()
set_source_files_properties(${BINDING_OUTPUTS} PROPERTIES GENERATED TRUE)
set_source_files_properties(${CMAKE_SOURCE_DIR}/src/Bindings/Bindings.cpp PROPERTIES COMPILE_FLAGS -Wno-error)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set_source_files_properties(DeprecatedBindings.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
set_source_files_properties(LuaState.cpp COMPILE_FLAGS "-Wno-error=old-style-cast")
set_source_files_properties(LuaWindow.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=switch-enum")
set_source_files_properties(ManualBindings.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
set_source_files_properties(ManualBindings_World.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
set_source_files_properties(PluginLua.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=old-style-cast")
endif()
if(NOT MSVC)
add_library(Bindings ${SRCS} ${HDRS})
target_link_libraries(Bindings lua sqlite tolualib mbedtls)
endif()
|