2016-01-01 15:05:09 -05:00
|
|
|
project (Cuberite)
|
2014-07-18 17:08:49 -04:00
|
|
|
|
|
|
|
include_directories ("${PROJECT_SOURCE_DIR}/../")
|
2014-07-18 19:04:07 -04:00
|
|
|
include_directories (".")
|
2014-07-18 17:08:49 -04:00
|
|
|
|
|
|
|
SET (SRCS
|
2014-10-21 15:25:52 -04:00
|
|
|
Bindings.cpp
|
|
|
|
DeprecatedBindings.cpp
|
|
|
|
LuaChunkStay.cpp
|
2015-12-23 05:08:39 -05:00
|
|
|
LuaJson.cpp
|
2015-01-29 05:09:56 -05:00
|
|
|
LuaNameLookup.cpp
|
2015-01-30 15:24:02 -05:00
|
|
|
LuaServerHandle.cpp
|
2014-10-21 15:25:52 -04:00
|
|
|
LuaState.cpp
|
2015-05-12 03:20:54 -04:00
|
|
|
LuaState_Implementation.cpp
|
2015-01-28 09:14:05 -05:00
|
|
|
LuaTCPLink.cpp
|
2015-02-20 08:28:05 -05:00
|
|
|
LuaUDPEndpoint.cpp
|
2014-10-21 15:25:52 -04:00
|
|
|
LuaWindow.cpp
|
|
|
|
ManualBindings.cpp
|
2017-06-24 05:58:06 -04:00
|
|
|
ManualBindings_BlockArea.cpp
|
2015-01-28 09:14:05 -05:00
|
|
|
ManualBindings_Network.cpp
|
2014-10-21 15:25:52 -04:00
|
|
|
ManualBindings_RankManager.cpp
|
2015-05-13 05:30:57 -04:00
|
|
|
ManualBindings_World.cpp
|
2014-10-21 15:25:52 -04:00
|
|
|
Plugin.cpp
|
|
|
|
PluginLua.cpp
|
|
|
|
PluginManager.cpp
|
2014-07-18 17:08:49 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
SET (HDRS
|
2014-10-21 15:25:52 -04:00
|
|
|
Bindings.h
|
|
|
|
DeprecatedBindings.h
|
|
|
|
LuaChunkStay.h
|
|
|
|
LuaFunctions.h
|
2015-12-23 05:08:39 -05:00
|
|
|
LuaJson.h
|
2015-01-29 05:09:56 -05:00
|
|
|
LuaNameLookup.h
|
2015-01-30 15:24:02 -05:00
|
|
|
LuaServerHandle.h
|
2014-10-21 15:25:52 -04:00
|
|
|
LuaState.h
|
2015-05-12 03:20:54 -04:00
|
|
|
LuaState_Declaration.inc
|
|
|
|
LuaState_Typedefs.inc
|
2015-01-28 09:14:05 -05:00
|
|
|
LuaTCPLink.h
|
2015-02-20 08:28:05 -05:00
|
|
|
LuaUDPEndpoint.h
|
2014-10-21 15:25:52 -04:00
|
|
|
LuaWindow.h
|
|
|
|
ManualBindings.h
|
|
|
|
Plugin.h
|
|
|
|
PluginLua.h
|
|
|
|
PluginManager.h
|
|
|
|
tolua++.h
|
2014-07-18 17:08:49 -04:00
|
|
|
)
|
2014-07-18 18:27:50 -04:00
|
|
|
|
2014-07-18 19:04:07 -04:00
|
|
|
# List all the files that are generated as part of the Bindings build process
|
|
|
|
set (BINDING_OUTPUTS
|
2014-10-21 15:25:52 -04:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Bindings.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Bindings.h
|
2015-05-12 03:20:54 -04:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/LuaState_Declaration.inc
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/LuaState_Implementation.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/LuaState_Typedefs.inc
|
2014-07-18 19:04:07 -04:00
|
|
|
)
|
|
|
|
|
2014-07-22 17:29:04 -04:00
|
|
|
set(BINDING_DEPENDENCIES
|
2014-10-21 15:25:52 -04:00
|
|
|
../Bindings/AllToLua.pkg
|
2015-05-12 03:20:54 -04:00
|
|
|
../Bindings/BindingsProcessor.lua
|
2014-10-21 15:25:52 -04:00
|
|
|
../Bindings/LuaFunctions.h
|
|
|
|
../Bindings/LuaWindow.h
|
|
|
|
../Bindings/Plugin.h
|
|
|
|
../Bindings/PluginLua.h
|
|
|
|
../Bindings/PluginManager.h
|
|
|
|
../BiomeDef.h
|
|
|
|
../BlockArea.h
|
2014-07-30 16:19:51 -04:00
|
|
|
../BlockEntities/BeaconEntity.h
|
2017-07-07 03:31:45 -04:00
|
|
|
../BlockEntities/BedEntity.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../BlockEntities/BlockEntity.h
|
|
|
|
../BlockEntities/BlockEntityWithItems.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../BlockEntities/BrewingstandEntity.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../BlockEntities/ChestEntity.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../BlockEntities/CommandBlockEntity.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../BlockEntities/DispenserEntity.h
|
|
|
|
../BlockEntities/DropSpenserEntity.h
|
|
|
|
../BlockEntities/DropperEntity.h
|
|
|
|
../BlockEntities/FurnaceEntity.h
|
|
|
|
../BlockEntities/HopperEntity.h
|
|
|
|
../BlockEntities/JukeboxEntity.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../BlockEntities/MobSpawnerEntity.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../BlockEntities/NoteEntity.h
|
|
|
|
../BlockEntities/SignEntity.h
|
|
|
|
../BlockEntities/MobHeadEntity.h
|
|
|
|
../BlockEntities/FlowerPotEntity.h
|
|
|
|
../BlockID.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../BlockInfo.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../BoundingBox.h
|
|
|
|
../ChatColor.h
|
|
|
|
../ChunkDef.h
|
|
|
|
../ClientHandle.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../CompositeChat.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../CraftingRecipes.h
|
|
|
|
../Cuboid.h
|
|
|
|
../Defines.h
|
2017-06-21 09:10:32 -04:00
|
|
|
../EffectID.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../Enchantments.h
|
2017-05-09 08:21:25 -04:00
|
|
|
../Entities/Boat.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../Entities/ArrowEntity.h
|
|
|
|
../Entities/Entity.h
|
2017-05-09 08:24:41 -04:00
|
|
|
../Entities/ExpOrb.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../Entities/EntityEffect.h
|
|
|
|
../Entities/ExpBottleEntity.h
|
2017-05-09 08:24:41 -04:00
|
|
|
../Entities/FallingBlock.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../Entities/FireChargeEntity.h
|
|
|
|
../Entities/FireworkEntity.h
|
|
|
|
../Entities/Floater.h
|
|
|
|
../Entities/GhastFireballEntity.h
|
2014-10-21 16:02:30 -04:00
|
|
|
../Entities/HangingEntity.h
|
|
|
|
../Entities/ItemFrame.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../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
|
2016-07-01 18:23:21 -04:00
|
|
|
../IniFile.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../Inventory.h
|
|
|
|
../Item.h
|
|
|
|
../ItemGrid.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../Map.h
|
|
|
|
../MapManager.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../Mobs/Monster.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../Mobs/MonsterTypes.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../OSSupport/File.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../Protocol/MojangAPI.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../Root.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../Scoreboard.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../Server.h
|
2016-07-01 18:23:21 -04:00
|
|
|
../Statistics.h
|
2014-10-21 15:25:52 -04:00
|
|
|
../StringUtils.h
|
|
|
|
../Tracer.h
|
|
|
|
../UI/Window.h
|
|
|
|
../Vector3.h
|
|
|
|
../WebAdmin.h
|
|
|
|
../World.h
|
2014-07-18 19:04:07 -04:00
|
|
|
)
|
|
|
|
|
2014-07-19 07:22:16 -04:00
|
|
|
if (NOT MSVC)
|
2016-07-21 05:46:31 -04:00
|
|
|
if (USE_SYSTEM_LUA)
|
2016-07-17 10:23:29 -04:00
|
|
|
ADD_CUSTOM_COMMAND(
|
|
|
|
OUTPUT ${BINDING_OUTPUTS}
|
|
|
|
COMMAND lua BindingsProcessor.lua
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
DEPENDS ${BINDING_DEPENDENCIES}
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
ADD_CUSTOM_COMMAND(
|
|
|
|
OUTPUT ${BINDING_OUTPUTS}
|
2017-05-04 09:01:15 -04:00
|
|
|
COMMAND luaexe BindingsProcessor.lua
|
2016-07-17 10:23:29 -04:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
2017-05-04 09:01:15 -04:00
|
|
|
DEPENDS ${BINDING_DEPENDENCIES} luaexe
|
2016-07-17 10:23:29 -04:00
|
|
|
)
|
|
|
|
endif()
|
2014-07-18 19:04:07 -04:00
|
|
|
endif ()
|
2014-10-21 15:25:52 -04:00
|
|
|
|
2015-05-12 03:20:54 -04:00
|
|
|
set_source_files_properties(${BINDING_OUTPUTS} PROPERTIES GENERATED TRUE)
|
2014-07-18 19:04:07 -04:00
|
|
|
|
2014-09-17 13:40:10 -04:00
|
|
|
set_source_files_properties(${CMAKE_SOURCE_DIR}/src/Bindings/Bindings.cpp PROPERTIES COMPILE_FLAGS -Wno-error)
|
|
|
|
|
2015-05-19 14:32:10 -04:00
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
2016-11-07 17:15:07 -05:00
|
|
|
set_source_files_properties(Bindings.cpp PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} "-Wno-old-style-cast -Wno-missing-prototypes")
|
2015-05-19 14:32:10 -04:00
|
|
|
set_source_files_properties(LuaWindow.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=switch-enum")
|
|
|
|
endif()
|
|
|
|
|
2014-07-18 18:27:50 -04:00
|
|
|
if(NOT MSVC)
|
2014-10-21 15:25:52 -04:00
|
|
|
add_library(Bindings ${SRCS} ${HDRS})
|
2015-12-25 12:50:25 -05:00
|
|
|
target_link_libraries(Bindings lua sqlite tolualib mbedtls HTTPServer)
|
2014-07-18 18:27:50 -04:00
|
|
|
endif()
|