1
0

Merge pull request #1214 from mc-server/anti-glob

CMake - Explicitly lists all source files
This commit is contained in:
Mattes D 2014-07-19 14:29:22 +02:00
commit 4293db5eae
16 changed files with 846 additions and 213 deletions

135
src/Bindings/CMakeLists.txt Normal file
View File

@ -0,0 +1,135 @@
cmake_minimum_required (VERSION 2.6)
project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
include_directories (".")
SET (SRCS
Bindings.cpp
DeprecatedBindings.cpp
LuaChunkStay.cpp
LuaState.cpp
LuaWindow.cpp
ManualBindings.cpp
Plugin.cpp
PluginLua.cpp
PluginManager.cpp
WebPlugin.cpp
)
SET (HDRS
Bindings.h
DeprecatedBindings.h
LuaChunkStay.h
LuaFunctions.h
LuaState.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_Call.inc
)
set(BINDING_DEPENDECIES
tolua
../Bindings/virtual_method_hooks.lua
../Bindings/AllToLua.pkg
../Bindings/gen_LuaState_Call.lua
../Bindings/LuaFunctions.h
../Bindings/LuaState_Call.inc
../Bindings/LuaWindow.h
../Bindings/Plugin.h
../Bindings/PluginLua.h
../Bindings/PluginManager.h
../Bindings/WebPlugin.h
../BiomeDef.h
../BlockArea.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/EntityEffect.h
../Entities/Entity.h
../Entities/Floater.h
../Entities/Pawn.h
../Entities/Painting.h
../Entities/Pickup.h
../Entities/Player.h
../Entities/ProjectileEntity.h
../Entities/ArrowEntity.h
../Entities/ThrownEggEntity.h
../Entities/ThrownEnderPearlEntity.h
../Entities/ExpBottleEntity.h
../Entities/ThrownSnowballEntity.h
../Entities/FireChargeEntity.h
../Entities/FireworkEntity.h
../Entities/GhastFireballEntity.h
../Entities/TNTEntity.h
../Entities/ExpOrb.h
../Entities/HangingEntity.h
../Entities/ItemFrame.h
../Generating/ChunkDesc.h
../Group.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 virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
# add any new generation dependencies here
DEPENDS ${BINDING_DEPENDECIES}
)
endif ()
set_source_files_properties(Bindings/Bindings.cpp PROPERTIES GENERATED TRUE)
set_source_files_properties(Bindings/Bindings.h PROPERTIES GENERATED TRUE)
if(NOT MSVC)
add_library(Bindings ${SRCS} ${HDRS})
target_link_libraries(Bindings lua sqlite tolualib polarssl)
endif()

View File

@ -4,9 +4,41 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
BeaconEntity.cpp
BlockEntity.cpp
ChestEntity.cpp
CommandBlockEntity.cpp
DispenserEntity.cpp
DropSpenserEntity.cpp
DropperEntity.cpp
EnderChestEntity.cpp
FlowerPotEntity.cpp
FurnaceEntity.cpp
HopperEntity.cpp
JukeboxEntity.cpp
MobHeadEntity.cpp
NoteEntity.cpp
SignEntity.cpp)
add_library(BlockEntities ${SOURCE})
SET (HDRS
BeaconEntity.h
BlockEntity.h
BlockEntityWithItems.h
ChestEntity.h
CommandBlockEntity.h
DispenserEntity.h
DropSpenserEntity.h
DropperEntity.h
EnderChestEntity.h
FlowerPotEntity.h
FurnaceEntity.h
HopperEntity.h
JukeboxEntity.h
MobHeadEntity.h
NoteEntity.h
SignEntity.h)
if(NOT MSVC)
add_library(BlockEntities ${SRCS} ${HDRS})
endif()

View File

@ -4,9 +4,99 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
BlockBed.cpp
BlockDoor.cpp
BlockHandler.cpp
BlockPiston.cpp
ChunkInterface.cpp)
add_library(Blocks ${SOURCE})
SET (HDRS
BlockAnvil.h
BlockBed.h
BlockBigFlower.h
BlockBrewingStand.h
BlockButton.h
BlockCactus.h
BlockCake.h
BlockCarpet.h
BlockCauldron.h
BlockChest.h
BlockCloth.h
BlockCobWeb.h
BlockCommandBlock.h
BlockComparator.h
BlockCrops.h
BlockDeadBush.h
BlockDirt.h
BlockDoor.h
BlockDropSpenser.h
BlockEnchantmentTable.h
BlockEnderchest.h
BlockEntity.h
BlockFarmland.h
BlockFenceGate.h
BlockFire.h
BlockFlower.h
BlockFlowerPot.h
BlockFluid.h
BlockFurnace.h
BlockGlass.h
BlockGlowstone.h
BlockGravel.h
BlockHandler.h
BlockHayBale.h
BlockHopper.h
BlockIce.h
BlockLadder.h
BlockLeaves.h
BlockLever.h
BlockLilypad.h
BlockMelon.h
BlockMobHead.h
BlockMushroom.h
BlockMycelium.h
BlockNetherWart.h
BlockNewLeaves.h
BlockNote.h
BlockOre.h
BlockPiston.h
BlockPlanks.h
BlockPluginInterface.h
BlockPortal.h
BlockPressurePlate.h
BlockPumpkin.h
BlockQuartz.h
BlockRail.h
BlockRedstone.h
BlockRedstoneLamp.h
BlockRedstoneRepeater.h
BlockRedstoneTorch.h
BlockSand.h
BlockSapling.h
BlockSideways.h
BlockSignPost.h
BlockSlab.h
BlockSnow.h
BlockStairs.h
BlockStems.h
BlockStone.h
BlockSugarcane.h
BlockTNT.h
BlockTallGrass.h
BlockTorch.h
BlockTrapdoor.h
BlockTripwire.h
BlockTripwireHook.h
BlockVine.h
BlockWallSign.h
BlockWorkbench.h
BroadcastInterface.h
ChunkInterface.h
ClearMetaOnDrop.h
MetaRotator.h
WorldInterface.h)
if(NOT MSVC)
add_library(Blocks ${SRCS} ${HDRS})
endif()

View File

@ -5,144 +5,148 @@ include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/")
include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/jsoncpp/include")
include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/polarssl/include")
set(FOLDERS OSSupport HTTPServer Items Blocks Protocol Generating PolarSSL++)
set(FOLDERS ${FOLDERS} WorldStorage Mobs Entities Simulator UI BlockEntities Generating/Prefabs)
set(FOLDERS
OSSupport HTTPServer Items Blocks Protocol Generating PolarSSL++ Bindings
WorldStorage Mobs Entities Simulator UI BlockEntities Generating/Prefabs
)
set(BINDING_DEPENDECIES
tolua
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/virtual_method_hooks.lua
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/AllToLua.pkg
Bindings/gen_LuaState_Call.lua
Bindings/LuaFunctions.h
Bindings/LuaWindow.h
Bindings/Plugin.h
Bindings/PluginLua.h
Bindings/PluginManager.h
Bindings/WebPlugin.h
SET (SRCS
BiomeDef.cpp
BlockArea.cpp
BlockID.cpp
BlockInfo.cpp
BoundingBox.cpp
ByteBuffer.cpp
ChatColor.cpp
Chunk.cpp
ChunkData.cpp
ChunkMap.cpp
ChunkSender.cpp
ChunkStay.cpp
ClientHandle.cpp
CommandOutput.cpp
CompositeChat.cpp
CraftingRecipes.cpp
Cuboid.cpp
DeadlockDetect.cpp
Enchantments.cpp
FastRandom.cpp
FurnaceRecipe.cpp
Globals.cpp
Group.cpp
GroupManager.cpp
Inventory.cpp
Item.cpp
ItemGrid.cpp
LightingThread.cpp
LineBlockTracer.cpp
LinearInterpolation.cpp
Log.cpp
MCLogger.cpp
Map.cpp
MapManager.cpp
MobCensus.cpp
MobFamilyCollecter.cpp
MobProximityCounter.cpp
MobSpawner.cpp
MonsterConfig.cpp
Noise.cpp
ProbabDistrib.cpp
RCONServer.cpp
Root.cpp
Scoreboard.cpp
Server.cpp
Statistics.cpp
StringCompression.cpp
StringUtils.cpp
Tracer.cpp
VoronoiMap.cpp
WebAdmin.cpp
World.cpp
main.cpp)
SET (HDRS
AllocationPool.h
BiomeDef.h
BlockArea.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
BlockInServerPluginInterface.h
BlockInfo.h
BlockTracer.h
BoundingBox.h
ByteBuffer.h
ChatColor.h
Chunk.h
ChunkData.h
ChunkDataCallback.h
ChunkDef.h
ChunkMap.h
ChunkSender.h
ChunkStay.h
ClientHandle.h
CommandOutput.h
CompositeChat.h
CraftingRecipes.h
Cuboid.h
DeadlockDetect.h
Defines.h
Enchantments.h
Entities/EntityEffect.h
Entities/Entity.h
Entities/Floater.h
Entities/Pawn.h
Entities/Painting.h
Entities/Pickup.h
Entities/Player.h
Entities/ProjectileEntity.h
Entities/ArrowEntity.h
Entities/ThrownEggEntity.h
Entities/ThrownEnderPearlEntity.h
Entities/ExpBottleEntity.h
Entities/ThrownSnowballEntity.h
Entities/FireChargeEntity.h
Entities/FireworkEntity.h
Entities/GhastFireballEntity.h
Entities/TNTEntity.h
Entities/ExpOrb.h
Entities/HangingEntity.h
Entities/ItemFrame.h
Generating/ChunkDesc.h
Endianness.h
FastRandom.h
ForEachChunkProvider.h
FurnaceRecipe.h
Globals.h
Group.h
GroupManager.h
Inventory.h
Item.h
ItemGrid.h
Mobs/Monster.h
OSSupport/File.h
LeakFinder.h
LightingThread.h
LineBlockTracer.h
LinearInterpolation.h
LinearUpscale.h
Log.h
MCLogger.h
Map.h
MapManager.h
Matrix4.h
MemoryLeak.h
MersenneTwister.h
MobCensus.h
MobFamilyCollecter.h
MobProximityCounter.h
MobSpawner.h
MonsterConfig.h
Noise.h
ProbabDistrib.h
RCONServer.h
Root.h
Scoreboard.h
Server.h
StackWalker.h
Statistics.h
StringCompression.h
StringUtils.h
Tracer.h
UI/Window.h
Vector3.h
VoronoiMap.h
WebAdmin.h
World.h
)
XMLParser.h)
# List all the files that are generated as part of the Bindings build process
set (BINDING_OUTPUTS
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.h
${CMAKE_CURRENT_SOURCE_DIR}/Bindings/LuaState_Call.inc
)
include_directories(Bindings)
include_directories(.)
if (WIN32)
ADD_CUSTOM_COMMAND(
OUTPUT ${BINDING_OUTPUTS}
# Copy the Lua DLL into the Bindings folder, so that tolua can run from there:
COMMAND ${CMAKE_COMMAND} -E copy_if_different ../../MCServer/lua51.dll ./lua51.dll
# Regenerate bindings:
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
# add any new generation dependencies here
DEPENDS ${BINDING_DEPENDECIES}
)
else ()
ADD_CUSTOM_COMMAND(
# add any new generated bindings here
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.h
# Regenerate bindings:
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
# add any new generation dependencies here
DEPENDS ${BINDING_DEPENDECIES}
)
endif ()
set_source_files_properties(Bindings/Bindings.cpp PROPERTIES GENERATED TRUE)
set_source_files_properties(Bindings/Bindings.h PROPERTIES GENERATED TRUE)
include_directories(".")
if (NOT MSVC)
# Bindings need to reference other folders, so they are done here instead
# lib dependencies are not included
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../lib/polarssl/include")
#add cpp files here
add_library(Bindings
Bindings/Bindings
Bindings/DeprecatedBindings
Bindings/LuaChunkStay
Bindings/LuaState
Bindings/LuaWindow
Bindings/ManualBindings
Bindings/Plugin
Bindings/PluginLua
Bindings/PluginManager
Bindings/WebPlugin
)
foreach(folder ${FOLDERS})
add_subdirectory(${folder})
endforeach(folder)
target_link_libraries(Bindings lua sqlite tolualib polarssl)
get_directory_property(BINDING_DEPENDENCIES DIRECTORY "Bindings" DEFINITION BINDING_DEPENDENCIES)
#clear file
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/BindingDependecies.txt)
@ -153,43 +157,19 @@ if (NOT MSVC)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "Bindings.cpp Bindings.h")
foreach(folder ${FOLDERS})
add_subdirectory(${folder})
endforeach(folder)
file(GLOB SOURCE
"*.cpp"
"*.h"
)
list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/StackWalker.cpp" "${PROJECT_SOURCE_DIR}/LeakFinder.cpp")
list(APPEND SOURCE "${SRCS}")
list(APPEND SOURCE "${HDRS}")
# If building a windows version, but not using MSVC, add the resources directly to the makefile:
if (WIN32)
FILE(GLOB ResourceFiles
"Resources/*.rc"
)
list(APPEND SOURCE "${ResourceFiles}")
list(APPEND SOURCE "Resources/MCServer.rc")
endif()
else ()
# MSVC-specific handling: Put all files into one project, separate by the folders:
# Get all files in this folder:
file(GLOB_RECURSE SOURCE
"*.cpp"
"*.h"
"*.pkg"
)
source_group("" FILES ${SOURCE})
LIST(APPEND SOURCE "Bindings/Bindings.cpp" "Bindings/Bindings.h")
source_group(Bindings FILES "Bindings/Bindings.cpp" "Bindings/Bindings.h")
# Add all subfolders as solution-folders:
list(APPEND FOLDERS "Resources")
list(APPEND FOLDERS "Bindings")
function(includefolder PATH)
FILE(GLOB FOLDER_FILES
"${PATH}/*.cpp"
@ -202,9 +182,29 @@ else ()
endfunction(includefolder)
foreach(folder ${FOLDERS})
add_subdirectory(${folder})
includefolder(${folder})
# Get all source files in this folder:
get_directory_property(FOLDER_SRCS DIRECTORY ${folder} DEFINITION SRCS)
foreach (src ${FOLDER_SRCS})
list(APPEND SOURCE "${folder}/${src}")
endforeach(src)
# Get all headers in this folder:
get_directory_property(FOLDER_HDRS DIRECTORY ${folder} DEFINITION HDRS)
foreach (hdr ${FOLDER_HDRS})
list(APPEND SOURCE "${folder}/${hdr}")
endforeach(hdr)
endforeach(folder)
list(APPEND SOURCE "${SRCS}")
list(APPEND SOURCE "${HDRS}")
list(APPEND SOURCE "Bindings/AllToLua.pkg")
includefolder("Resources")
source_group("" FILES ${SOURCE})
include_directories("${PROJECT_SOURCE_DIR}")
# Precompiled headers (1st part)
@ -230,6 +230,25 @@ endif()
set(EXECUTABLE MCServer)
if (MSVC)
get_directory_property(BINDING_OUTPUTS DIRECTORY "Bindings" DEFINITION BINDING_OUTPUTS)
get_directory_property(BINDING_DEPENDENCIES DIRECTORY "Bindings" DEFINITION BINDING_DEPENDENCIES)
ADD_CUSTOM_COMMAND(
OUTPUT ${BINDING_OUTPUTS}
# Copy the Lua DLL into the Bindings folder, so that tolua can run from there:
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/MCServer/lua51.dll ./lua51.dll
# Regenerate bindings:
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
# add any new generation dependencies here
DEPENDS ${BINDING_DEPENDECIES}
)
endif()
add_executable(${EXECUTABLE} ${SOURCE})
@ -261,9 +280,11 @@ endif ()
if (NOT MSVC)
target_link_libraries(${EXECUTABLE} OSSupport HTTPServer Bindings Items Blocks)
target_link_libraries(${EXECUTABLE} Protocol Generating Generating_Prefabs WorldStorage)
target_link_libraries(${EXECUTABLE} Mobs Entities Simulator UI BlockEntities PolarSSL++)
target_link_libraries(${EXECUTABLE}
OSSupport HTTPServer Bindings Items Blocks
Protocol Generating Generating_Prefabs WorldStorage
Mobs Entities Simulator UI BlockEntities PolarSSL++
)
endif ()
if (WIN32)
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)

View File

@ -4,11 +4,64 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
ArrowEntity.cpp
Boat.cpp
EnderCrystal.cpp
Entity.cpp
EntityEffect.cpp
ExpBottleEntity.cpp
ExpOrb.cpp
FallingBlock.cpp
FireChargeEntity.cpp
FireworkEntity.cpp
Floater.cpp
GhastFireballEntity.cpp
HangingEntity.cpp
ItemFrame.cpp
Minecart.cpp
Painting.cpp
Pawn.cpp
Pickup.cpp
Player.cpp
ProjectileEntity.cpp
SplashPotionEntity.cpp
TNTEntity.cpp
ThrownEggEntity.cpp
ThrownEnderPearlEntity.cpp
ThrownSnowballEntity.cpp
WitherSkullEntity.cpp)
add_library(Entities ${SOURCE})
SET (HDRS
ArrowEntity.h
Boat.h
EnderCrystal.h
Entity.h
EntityEffect.h
ExpBottleEntity.h
ExpOrb.h
FallingBlock.h
FireChargeEntity.h
FireworkEntity.h
Floater.h
GhastFireballEntity.h
HangingEntity.h
ItemFrame.h
Minecart.h
Painting.h
Pawn.h
Pickup.h
Player.h
ProjectileEntity.h
SplashPotionEntity.h
TNTEntity.h
ThrownEggEntity.h
ThrownEnderPearlEntity.h
ThrownSnowballEntity.h
WitherSkullEntity.h)
target_link_libraries(Entities WorldStorage)
if(NOT MSVC)
add_library(Entities ${SRCS} ${HDRS})
target_link_libraries(Entities WorldStorage)
endif()

View File

@ -4,11 +4,62 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
BioGen.cpp
Caves.cpp
ChunkDesc.cpp
ChunkGenerator.cpp
CompoGen.cpp
ComposableGenerator.cpp
DistortedHeightmap.cpp
EndGen.cpp
FinishGen.cpp
GridStructGen.cpp
HeiGen.cpp
MineShafts.cpp
NetherFortGen.cpp
Noise3DGenerator.cpp
POCPieceGenerator.cpp
PieceGenerator.cpp
Prefab.cpp
PrefabPiecePool.cpp
RainbowRoadsGen.cpp
Ravines.cpp
StructGen.cpp
TestRailsGen.cpp
Trees.cpp
UnderwaterBaseGen.cpp
VillageGen.cpp)
add_library(Generating ${SOURCE})
SET (HDRS
BioGen.h
Caves.h
ChunkDesc.h
ChunkGenerator.h
CompoGen.h
ComposableGenerator.h
DistortedHeightmap.h
EndGen.h
FinishGen.h
GridStructGen.h
HeiGen.h
MineShafts.h
NetherFortGen.h
Noise3DGenerator.h
POCPieceGenerator.h
PieceGenerator.h
Prefab.h
PrefabPiecePool.h
RainbowRoadsGen.h
Ravines.h
StructGen.h
TestRailsGen.h
Trees.h
UnderwaterBaseGen.h
VillageGen.h)
target_link_libraries(Generating OSSupport iniFile Blocks)
if(NOT MSVC)
add_library(Generating ${SRCS} ${HDRS})
target_link_libraries(Generating OSSupport iniFile Blocks)
endif()

View File

@ -4,11 +4,30 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
AlchemistVillagePrefabs.cpp
JapaneseVillagePrefabs.cpp
NetherFortPrefabs.cpp
PlainsVillagePrefabs.cpp
RainbowRoadPrefabs.cpp
SandFlatRoofVillagePrefabs.cpp
SandVillagePrefabs.cpp
TestRailsPrefabs.cpp
UnderwaterBasePrefabs.cpp)
add_library(Generating_Prefabs ${SOURCE})
SET (HDRS
AlchemistVillagePrefabs.h
JapaneseVillagePrefabs.h
NetherFortPrefabs.h
PlainsVillagePrefabs.h
RainbowRoadPrefabs.h
SandFlatRoofVillagePrefabs.h
SandVillagePrefabs.h
TestRailsPrefabs.h
UnderwaterBasePrefabs.h)
target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks)
if(NOT MSVC)
add_library(Generating_Prefabs ${SRCS} ${HDRS})
target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks)
endif()

View File

@ -4,9 +4,26 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
EnvelopeParser.cpp
HTTPConnection.cpp
HTTPFormParser.cpp
HTTPMessage.cpp
HTTPServer.cpp
MultipartParser.cpp
NameValueParser.cpp
SslHTTPConnection.cpp)
add_library(HTTPServer ${SOURCE})
SET (HDRS
EnvelopeParser.h
HTTPConnection.h
HTTPFormParser.h
HTTPMessage.h
HTTPServer.h
MultipartParser.h
NameValueParser.h
SslHTTPConnection.h)
if(NOT MSVC)
add_library(HTTPServer ${SRCS} ${HDRS})
endif()

View File

@ -4,9 +4,53 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
ItemHandler.cpp)
add_library(Items ${SOURCE})
SET (HDRS
ItemArmor.h
ItemBed.h
ItemBoat.h
ItemBow.h
ItemBrewingStand.h
ItemBucket.h
ItemCake.h
ItemCauldron.h
ItemCloth.h
ItemComparator.h
ItemDoor.h
ItemDye.h
ItemEmptyMap.h
ItemFishingRod.h
ItemFlowerPot.h
ItemFood.h
ItemHandler.h
ItemHoe.h
ItemItemFrame.h
ItemLeaves.h
ItemLighter.h
ItemLilypad.h
ItemMap.h
ItemMilk.h
ItemMinecart.h
ItemMobHead.h
ItemNetherWart.h
ItemPainting.h
ItemPickaxe.h
ItemPotion.h
ItemRedstoneDust.h
ItemRedstoneRepeater.h
ItemSapling.h
ItemSeeds.h
ItemShears.h
ItemShovel.h
ItemSign.h
ItemSpawnEgg.h
ItemString.h
ItemSugarcane.h
ItemSword.h
ItemThrowable.h)
if(NOT MSVC)
add_library(Items ${SRCS} ${HDRS})
endif()

View File

@ -4,9 +4,75 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
AggressiveMonster.cpp
Bat.cpp
Blaze.cpp
CaveSpider.cpp
Chicken.cpp
Cow.cpp
Creeper.cpp
EnderDragon.cpp
Enderman.cpp
Ghast.cpp
Giant.cpp
Horse.cpp
IronGolem.cpp
MagmaCube.cpp
Monster.cpp
Mooshroom.cpp
PassiveAggressiveMonster.cpp
PassiveMonster.cpp
Pig.cpp
Sheep.cpp
Skeleton.cpp
Slime.cpp
SnowGolem.cpp
Spider.cpp
Squid.cpp
Villager.cpp
Witch.cpp
Wither.cpp
Wolf.cpp
Zombie.cpp
ZombiePigman.cpp)
add_library(Mobs ${SOURCE})
SET (HDRS
AggressiveMonster.h
Bat.h
Blaze.h
CaveSpider.h
Chicken.h
Cow.h
Creeper.h
EnderDragon.h
Enderman.h
Ghast.h
Giant.h
Horse.h
IncludeAllMonsters.h
IronGolem.h
MagmaCube.h
Monster.h
Mooshroom.h
Ocelot.h
PassiveAggressiveMonster.h
PassiveMonster.h
Pig.h
Sheep.h
Silverfish.h
Skeleton.h
Slime.h
SnowGolem.h
Spider.h
Squid.h
Villager.h
Witch.h
Wither.h
Wolf.h
Zombie.h
ZombiePigman.h)
if(NOT MSVC)
add_library(Mobs ${SRCS} ${HDRS})
endif()

View File

@ -3,13 +3,42 @@ cmake_minimum_required (VERSION 2.6)
project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
add_library(OSSupport ${SOURCE})
SET (SRCS
CriticalSection.cpp
Errors.cpp
Event.cpp
File.cpp
GZipFile.cpp
IsThread.cpp
ListenThread.cpp
Semaphore.cpp
Sleep.cpp
Socket.cpp
SocketThreads.cpp
Thread.cpp
Timer.cpp)
if(UNIX)
target_link_libraries(OSSupport pthread)
SET (HDRS
CriticalSection.h
Errors.h
Event.h
File.h
GZipFile.h
IsThread.h
ListenThread.h
Queue.h
Semaphore.h
Sleep.h
Socket.h
SocketThreads.h
Thread.h
Timer.h)
if(NOT MSVC)
add_library(OSSupport ${SRCS} ${HDRS})
if(UNIX)
target_link_libraries(OSSupport pthread)
endif()
endif()

View File

@ -3,7 +3,7 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
set(SOURCES
set(SRCS
AesCfb128Decryptor.cpp
AesCfb128Encryptor.cpp
BlockingSslClientSocket.cpp
@ -18,7 +18,7 @@ set(SOURCES
X509Cert.cpp
)
set(HEADERS
set(HDRS
AesCfb128Decryptor.h
AesCfb128Encryptor.h
BlockingSslClientSocket.h
@ -33,8 +33,10 @@ set(HEADERS
X509Cert.h
)
add_library(PolarSSL++ ${SOURCES} ${HEADERS})
if(NOT MSVC)
add_library(PolarSSL++ ${SRCS} ${HDRS})
if (UNIX)
target_link_libraries(PolarSSL++ polarssl)
if (UNIX)
target_link_libraries(PolarSSL++ polarssl)
endif()
endif()

View File

@ -4,9 +4,29 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
Authenticator.cpp
ChunkDataSerializer.cpp
Protocol125.cpp
Protocol132.cpp
Protocol14x.cpp
Protocol15x.cpp
Protocol16x.cpp
Protocol17x.cpp
ProtocolRecognizer.cpp)
add_library(Protocol ${SOURCE})
SET (HDRS
Authenticator.h
ChunkDataSerializer.h
Protocol.h
Protocol125.h
Protocol132.h
Protocol14x.h
Protocol15x.h
Protocol16x.h
Protocol17x.h
ProtocolRecognizer.h)
if(NOT MSVC)
add_library(Protocol ${SRCS} ${HDRS})
endif()

View File

@ -4,9 +4,34 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
DelayedFluidSimulator.cpp
FireSimulator.cpp
FloodyFluidSimulator.cpp
FluidSimulator.cpp
IncrementalRedstoneSimulator.cpp
RedstoneSimulator.cpp
SandSimulator.cpp
Simulator.cpp
SimulatorManager.cpp
VanillaFluidSimulator.cpp
VaporizeFluidSimulator.cpp)
add_library(Simulator ${SOURCE})
SET (HDRS
DelayedFluidSimulator.h
FireSimulator.h
FloodyFluidSimulator.h
FluidSimulator.h
IncrementalRedstoneSimulator.h
NoopFluidSimulator.h
NoopRedstoneSimulator.h
RedstoneSimulator.h
SandSimulator.h
Simulator.h
SimulatorManager.h
VanillaFluidSimulator.h
VaporizeFluidSimulator.h)
if(NOT MSVC)
add_library(Simulator ${SRCS} ${HDRS})
endif()

View File

@ -4,9 +4,15 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
SlotArea.cpp
Window.cpp)
add_library(UI ${SOURCE})
SET (HDRS
SlotArea.h
Window.h
WindowOwner.h)
if(NOT MSVC)
add_library(UI ${SRCS} ${HDRS})
endif()

View File

@ -4,11 +4,34 @@ project (MCServer)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.cpp"
"*.h"
)
SET (SRCS
EnchantmentSerializer.cpp
FastNBT.cpp
FireworksSerializer.cpp
MapSerializer.cpp
NBTChunkSerializer.cpp
SchematicFileSerializer.cpp
ScoreboardSerializer.cpp
StatSerializer.cpp
WSSAnvil.cpp
WSSCompact.cpp
WorldStorage.cpp)
add_library(WorldStorage ${SOURCE})
SET (HDRS
EnchantmentSerializer.h
FastNBT.h
FireworksSerializer.h
MapSerializer.h
NBTChunkSerializer.h
SchematicFileSerializer.h
ScoreboardSerializer.h
StatSerializer.h
WSSAnvil.h
WSSCompact.h
WorldStorage.h)
target_link_libraries(WorldStorage OSSupport)
if(NOT MSVC)
add_library(WorldStorage ${SRCS} ${HDRS})
target_link_libraries(WorldStorage OSSupport)
endif()