From 2f811fc6a2cf2ddacdcb443049a44ad6481f135a Mon Sep 17 00:00:00 2001 From: archshift Date: Thu, 17 Jul 2014 23:55:34 -0700 Subject: Mobs/CMakeLists.txt: Replaced glob with list of files --- src/Mobs/CMakeLists.txt | 74 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 69 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Mobs/CMakeLists.txt b/src/Mobs/CMakeLists.txt index 53c265803..d73a7aafd 100644 --- a/src/Mobs/CMakeLists.txt +++ b/src/Mobs/CMakeLists.txt @@ -4,9 +4,73 @@ 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) + +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) -add_library(Mobs ${SOURCE}) +add_library(Mobs ${SRCS} ${HDRS}) -- cgit v1.2.3 From 1d8e3e2bb8ca66e83b395e0131d4e5ededb385d0 Mon Sep 17 00:00:00 2001 From: archshift Date: Thu, 17 Jul 2014 23:57:35 -0700 Subject: Entities/CMakeLists.txt: Replaced glob with list of files --- src/Entities/CMakeLists.txt | 61 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Entities/CMakeLists.txt b/src/Entities/CMakeLists.txt index 205cb2cca..64752d13c 100644 --- a/src/Entities/CMakeLists.txt +++ b/src/Entities/CMakeLists.txt @@ -4,11 +4,62 @@ 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) + +add_library(Entities ${SRCS} ${HDRS}) target_link_libraries(Entities WorldStorage) -- cgit v1.2.3 From 465743757a4847b860d932a20c3a7570aec6bec5 Mon Sep 17 00:00:00 2001 From: archshift Date: Thu, 17 Jul 2014 23:59:33 -0700 Subject: Items/CMakeLists.txt: Replaced glob with list of files --- src/Items/CMakeLists.txt | 52 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Items/CMakeLists.txt b/src/Items/CMakeLists.txt index a6fe6ea70..0c15a6944 100644 --- a/src/Items/CMakeLists.txt +++ b/src/Items/CMakeLists.txt @@ -4,9 +4,51 @@ 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) + +add_library(Items ${SRCS} ${HDRS}) -- cgit v1.2.3 From 61c4e2e5cbe93592a5dc1d704ca29a405ac61428 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:01:26 -0700 Subject: Blocks/CMakeLists.txt: Replaced glob with list of files --- src/Blocks/CMakeLists.txt | 97 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 92 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Blocks/CMakeLists.txt b/src/Blocks/CMakeLists.txt index 4b8c745ad..d356d151b 100644 --- a/src/Blocks/CMakeLists.txt +++ b/src/Blocks/CMakeLists.txt @@ -4,9 +4,96 @@ 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 + BlockSign.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 + BlockWorkbench.h + BroadcastInterface.h + ChunkInterface.h + ClearMetaOnDrop.h + MetaRotator.h + WorldInterface.h) + +add_library(Blocks ${SRCS} ${HDRS}) -- cgit v1.2.3 From 15aacc24a5e4adfb00cc0bf10703c83a60a0735b Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:03:19 -0700 Subject: Protocol/CMakeLists.txt: Replaced glob with list of files --- src/Protocol/CMakeLists.txt | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Protocol/CMakeLists.txt b/src/Protocol/CMakeLists.txt index 849ec27ca..21d49c516 100644 --- a/src/Protocol/CMakeLists.txt +++ b/src/Protocol/CMakeLists.txt @@ -4,9 +4,27 @@ 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) + +add_library(Protocol ${SRCS} ${HDRS}) -- cgit v1.2.3 From 5890d04f212e83bdc2e2305e006e6091471802fc Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:05:50 -0700 Subject: UI/CMakeLists.txt: Replaced glob with list of files --- src/UI/CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/UI/CMakeLists.txt b/src/UI/CMakeLists.txt index 5b5b8cc18..c41123318 100644 --- a/src/UI/CMakeLists.txt +++ b/src/UI/CMakeLists.txt @@ -4,9 +4,13 @@ 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) + +add_library(UI ${SRCS} ${HDRS}) -- cgit v1.2.3 From 1a05b7c5d70f1a57dd09d6ae9d35d4c1fb10128e Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:14:15 -0700 Subject: BlockEntities/CMakeLists.txt: Replaced glob with list of files --- src/BlockEntities/CMakeLists.txt | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/BlockEntities/CMakeLists.txt b/src/BlockEntities/CMakeLists.txt index 3e3d17f86..4cd49c52d 100644 --- a/src/BlockEntities/CMakeLists.txt +++ b/src/BlockEntities/CMakeLists.txt @@ -4,9 +4,39 @@ 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) + +add_library(BlockEntities ${SRCS} ${HDRS}) -- cgit v1.2.3 From 06bef093bf3a035e03bf22808e82f8d82638dbfc Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:20:38 -0700 Subject: Generating/CMakeLists.txt: Replaced glob with list of files --- src/Generating/CMakeLists.txt | 59 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Generating/CMakeLists.txt b/src/Generating/CMakeLists.txt index 3dacb5066..b3960914c 100644 --- a/src/Generating/CMakeLists.txt +++ b/src/Generating/CMakeLists.txt @@ -4,11 +4,60 @@ 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) + +add_library(Generating ${SRCS} ${HDRS}) target_link_libraries(Generating OSSupport iniFile Blocks) -- cgit v1.2.3 From 9fe4b61df35ebad8df7b928af73bc798ebaf731f Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:26:55 -0700 Subject: WorldStorage/CMakeLists.txt: Replaced glob with list of files --- src/WorldStorage/CMakeLists.txt | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/WorldStorage/CMakeLists.txt b/src/WorldStorage/CMakeLists.txt index 2844f7fe5..212581400 100644 --- a/src/WorldStorage/CMakeLists.txt +++ b/src/WorldStorage/CMakeLists.txt @@ -4,11 +4,32 @@ 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) + +add_library(WorldStorage ${SRCS} ${HDRS}) target_link_libraries(WorldStorage OSSupport) -- cgit v1.2.3 From 0859ee3995d0cc80d80b328af920911d1cfb25d3 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:28:40 -0700 Subject: Simulator/CMakeLists.txt: Replaced glob with list of files --- src/Simulator/CMakeLists.txt | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Simulator/CMakeLists.txt b/src/Simulator/CMakeLists.txt index b2a29d45c..f56fb0079 100644 --- a/src/Simulator/CMakeLists.txt +++ b/src/Simulator/CMakeLists.txt @@ -4,9 +4,32 @@ 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) + +add_library(Simulator ${SRCS} ${HDRS}) -- cgit v1.2.3 From de48688fdbca822a09a9b8abad2010768ab36a20 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:34:21 -0700 Subject: Generating/Prefabs/CMakeLists.txt: Replaced glob with list of files --- src/Generating/Prefabs/CMakeLists.txt | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Generating/Prefabs/CMakeLists.txt b/src/Generating/Prefabs/CMakeLists.txt index a1f09112d..d53098b4e 100644 --- a/src/Generating/Prefabs/CMakeLists.txt +++ b/src/Generating/Prefabs/CMakeLists.txt @@ -4,11 +4,28 @@ 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) + +add_library(Generating_Prefabs ${SRCS} ${HDRS}) target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks) -- cgit v1.2.3 From 5d966be741eef68749412d706de05d963628abc9 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:46:39 -0700 Subject: HTTPServer/CMakeLists.txt: Replaced glob with list of files --- src/HTTPServer/CMakeLists.txt | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/HTTPServer/CMakeLists.txt b/src/HTTPServer/CMakeLists.txt index dc894368d..a15b2494f 100644 --- a/src/HTTPServer/CMakeLists.txt +++ b/src/HTTPServer/CMakeLists.txt @@ -4,9 +4,24 @@ 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) + +add_library(HTTPServer ${SRCS} ${HDRS}) -- cgit v1.2.3 From dcaa3262a2b085fa3ea9769c7eee21d3cd48c834 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 00:48:22 -0700 Subject: OSSupport/CMakeLists.txt: Replaced glob with list of files --- src/OSSupport/CMakeLists.txt | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/OSSupport/CMakeLists.txt b/src/OSSupport/CMakeLists.txt index dee60b450..8004d4094 100644 --- a/src/OSSupport/CMakeLists.txt +++ b/src/OSSupport/CMakeLists.txt @@ -3,12 +3,39 @@ 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) + +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) + +add_library(OSSupport ${SRCS} ${HDRS}) if(UNIX) target_link_libraries(OSSupport pthread) -- cgit v1.2.3 From 34c8ff7b24171f9712ce3156013187257bb45327 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 01:40:01 -0700 Subject: src/CMakeLists: Small changes for increased readability --- src/CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fdc33cd82..c33b0983a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,8 +5,10 @@ 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++ + WorldStorage Mobs Entities Simulator UI BlockEntities Generating/Prefabs +) set(BINDING_DEPENDECIES tolua @@ -261,9 +263,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) -- cgit v1.2.3 From 725d1fd1e2995b1720673c280fea1125ac338b3c Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 13:26:43 -0700 Subject: Subdirs: Only add_library if not using MSVC --- src/BlockEntities/CMakeLists.txt | 4 +++- src/Blocks/CMakeLists.txt | 4 +++- src/Entities/CMakeLists.txt | 6 ++++-- src/Generating/CMakeLists.txt | 6 ++++-- src/Generating/Prefabs/CMakeLists.txt | 6 ++++-- src/HTTPServer/CMakeLists.txt | 4 +++- src/Items/CMakeLists.txt | 4 +++- src/Mobs/CMakeLists.txt | 4 +++- src/OSSupport/CMakeLists.txt | 8 +++++--- src/Protocol/CMakeLists.txt | 4 +++- src/Simulator/CMakeLists.txt | 4 +++- src/UI/CMakeLists.txt | 4 +++- src/WorldStorage/CMakeLists.txt | 6 ++++-- 13 files changed, 45 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/BlockEntities/CMakeLists.txt b/src/BlockEntities/CMakeLists.txt index 4cd49c52d..d87594b0d 100644 --- a/src/BlockEntities/CMakeLists.txt +++ b/src/BlockEntities/CMakeLists.txt @@ -39,4 +39,6 @@ SET (HDRS NoteEntity.h SignEntity.h) -add_library(BlockEntities ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(BlockEntities ${SRCS} ${HDRS}) +endif() diff --git a/src/Blocks/CMakeLists.txt b/src/Blocks/CMakeLists.txt index d356d151b..d7edf7f29 100644 --- a/src/Blocks/CMakeLists.txt +++ b/src/Blocks/CMakeLists.txt @@ -96,4 +96,6 @@ SET (HDRS MetaRotator.h WorldInterface.h) -add_library(Blocks ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(Blocks ${SRCS} ${HDRS}) +endif() diff --git a/src/Entities/CMakeLists.txt b/src/Entities/CMakeLists.txt index 64752d13c..5d10e1680 100644 --- a/src/Entities/CMakeLists.txt +++ b/src/Entities/CMakeLists.txt @@ -60,6 +60,8 @@ SET (HDRS ThrownSnowballEntity.h WitherSkullEntity.h) -add_library(Entities ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(Entities ${SRCS} ${HDRS}) -target_link_libraries(Entities WorldStorage) + target_link_libraries(Entities WorldStorage) +endif() diff --git a/src/Generating/CMakeLists.txt b/src/Generating/CMakeLists.txt index b3960914c..9063abd97 100644 --- a/src/Generating/CMakeLists.txt +++ b/src/Generating/CMakeLists.txt @@ -58,6 +58,8 @@ SET (HDRS UnderwaterBaseGen.h VillageGen.h) -add_library(Generating ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(Generating ${SRCS} ${HDRS}) -target_link_libraries(Generating OSSupport iniFile Blocks) + target_link_libraries(Generating OSSupport iniFile Blocks) +endif() diff --git a/src/Generating/Prefabs/CMakeLists.txt b/src/Generating/Prefabs/CMakeLists.txt index d53098b4e..2c62aa73d 100644 --- a/src/Generating/Prefabs/CMakeLists.txt +++ b/src/Generating/Prefabs/CMakeLists.txt @@ -26,6 +26,8 @@ SET (HDRS TestRailsPrefabs.h UnderwaterBasePrefabs.h) -add_library(Generating_Prefabs ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(Generating_Prefabs ${SRCS} ${HDRS}) -target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks) + target_link_libraries(Generating_Prefabs OSSupport iniFile Blocks) +endif() diff --git a/src/HTTPServer/CMakeLists.txt b/src/HTTPServer/CMakeLists.txt index a15b2494f..b0efc810d 100644 --- a/src/HTTPServer/CMakeLists.txt +++ b/src/HTTPServer/CMakeLists.txt @@ -24,4 +24,6 @@ SET (HDRS NameValueParser.h SslHTTPConnection.h) -add_library(HTTPServer ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(HTTPServer ${SRCS} ${HDRS}) +endif() diff --git a/src/Items/CMakeLists.txt b/src/Items/CMakeLists.txt index 0c15a6944..12a467672 100644 --- a/src/Items/CMakeLists.txt +++ b/src/Items/CMakeLists.txt @@ -51,4 +51,6 @@ SET (HDRS ItemSword.h ItemThrowable.h) -add_library(Items ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(Items ${SRCS} ${HDRS}) +endif() diff --git a/src/Mobs/CMakeLists.txt b/src/Mobs/CMakeLists.txt index d73a7aafd..2c092c15f 100644 --- a/src/Mobs/CMakeLists.txt +++ b/src/Mobs/CMakeLists.txt @@ -73,4 +73,6 @@ SET (HDRS Zombie.h ZombiePigman.h) -add_library(Mobs ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(Mobs ${SRCS} ${HDRS}) +endif() diff --git a/src/OSSupport/CMakeLists.txt b/src/OSSupport/CMakeLists.txt index 8004d4094..a42fcbed4 100644 --- a/src/OSSupport/CMakeLists.txt +++ b/src/OSSupport/CMakeLists.txt @@ -35,8 +35,10 @@ SET (HDRS Thread.h Timer.h) -add_library(OSSupport ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(OSSupport ${SRCS} ${HDRS}) -if(UNIX) - target_link_libraries(OSSupport pthread) + if(UNIX) + target_link_libraries(OSSupport pthread) + endif() endif() diff --git a/src/Protocol/CMakeLists.txt b/src/Protocol/CMakeLists.txt index 21d49c516..ae447ce54 100644 --- a/src/Protocol/CMakeLists.txt +++ b/src/Protocol/CMakeLists.txt @@ -27,4 +27,6 @@ SET (HDRS Protocol17x.h ProtocolRecognizer.h) -add_library(Protocol ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(Protocol ${SRCS} ${HDRS}) +endif() diff --git a/src/Simulator/CMakeLists.txt b/src/Simulator/CMakeLists.txt index f56fb0079..521b145b6 100644 --- a/src/Simulator/CMakeLists.txt +++ b/src/Simulator/CMakeLists.txt @@ -32,4 +32,6 @@ SET (HDRS VanillaFluidSimulator.h VaporizeFluidSimulator.h) -add_library(Simulator ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(Simulator ${SRCS} ${HDRS}) +endif() diff --git a/src/UI/CMakeLists.txt b/src/UI/CMakeLists.txt index c41123318..2b094ef1d 100644 --- a/src/UI/CMakeLists.txt +++ b/src/UI/CMakeLists.txt @@ -13,4 +13,6 @@ SET (HDRS Window.h WindowOwner.h) -add_library(UI ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(UI ${SRCS} ${HDRS}) +endif() diff --git a/src/WorldStorage/CMakeLists.txt b/src/WorldStorage/CMakeLists.txt index 212581400..a00ff3b2f 100644 --- a/src/WorldStorage/CMakeLists.txt +++ b/src/WorldStorage/CMakeLists.txt @@ -30,6 +30,8 @@ SET (HDRS WSSCompact.h WorldStorage.h) -add_library(WorldStorage ${SRCS} ${HDRS}) +if(NOT MSVC) + add_library(WorldStorage ${SRCS} ${HDRS}) -target_link_libraries(WorldStorage OSSupport) + target_link_libraries(WorldStorage OSSupport) +endif() -- cgit v1.2.3 From 84fef3c1569b941e747c471b06b290876baa131e Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 14:08:49 -0700 Subject: src/CMakeLists.txt: Replaced glob with list of files On MSVC, CMake will traverse all the CMakeLists and add their source and header files to one conglomerate SOURCE list. --- src/Bindings/CMakeLists.txt | 32 +++++++++ src/CMakeLists.txt | 168 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 180 insertions(+), 20 deletions(-) create mode 100644 src/Bindings/CMakeLists.txt (limited to 'src') diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt new file mode 100644 index 000000000..fd6223469 --- /dev/null +++ b/src/Bindings/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required (VERSION 2.6) +project (MCServer) + +include_directories ("${PROJECT_SOURCE_DIR}/../") + +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 +) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c33b0983a..dc6fec02f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -82,6 +82,131 @@ set(BINDING_DEPENDECIES World.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 + 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 + Endianness.h + FastRandom.h + ForEachChunkProvider.h + FurnaceRecipe.h + Globals.h + Group.h + GroupManager.h + Inventory.h + Item.h + ItemGrid.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 + 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 @@ -159,38 +284,21 @@ if (NOT MSVC) 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 @@ -204,9 +312,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) -- cgit v1.2.3 From 832530469360020d5cc1bd0a4142c3450d4cd8f9 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 15:27:50 -0700 Subject: CMake: Add Bindings library from subdirectory --- src/Bindings/CMakeLists.txt | 6 ++++++ src/CMakeLists.txt | 29 ++++++----------------------- 2 files changed, 12 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt index fd6223469..da6a6919a 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -30,3 +30,9 @@ SET (HDRS WebPlugin.h tolua++.h ) + +if(NOT MSVC) + add_library(Bindings ${SRCS} ${HDRS}) + + target_link_libraries(Bindings lua sqlite tolualib polarssl) +endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc6fec02f..afe766f13 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,7 +6,7 @@ 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++ + OSSupport HTTPServer Items Blocks Protocol Generating PolarSSL++ Bindings WorldStorage Mobs Entities Simulator UI BlockEntities Generating/Prefabs ) @@ -250,26 +250,14 @@ set_source_files_properties(Bindings/Bindings.h PROPERTIES GENERATED TRUE) 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 - ) + include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../lib/polarssl/include") - target_link_libraries(Bindings lua sqlite tolualib polarssl) + foreach(folder ${FOLDERS}) + add_subdirectory(${folder}) + endforeach(folder) #clear file file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/BindingDependecies.txt) @@ -280,10 +268,6 @@ if (NOT MSVC) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "Bindings.cpp Bindings.h") - foreach(folder ${FOLDERS}) - add_subdirectory(${folder}) - endforeach(folder) - list(APPEND SOURCE "${SRCS}") list(APPEND SOURCE "${HDRS}") @@ -299,7 +283,6 @@ else () source_group(Bindings FILES "Bindings/Bindings.cpp" "Bindings/Bindings.h") # Add all subfolders as solution-folders: - list(APPEND FOLDERS "Bindings") function(includefolder PATH) FILE(GLOB FOLDER_FILES "${PATH}/*.cpp" -- cgit v1.2.3 From 3d368b015e2032f86130b8a3f4d05ca72287c63a Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 15:41:42 -0700 Subject: Blocks/CMakeLists.txt: Fixed header list after merge of master --- src/Blocks/CMakeLists.txt | 3 ++- src/CMakeLists.txt | 13 ++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/Blocks/CMakeLists.txt b/src/Blocks/CMakeLists.txt index d7edf7f29..05b7bfab4 100644 --- a/src/Blocks/CMakeLists.txt +++ b/src/Blocks/CMakeLists.txt @@ -75,7 +75,7 @@ SET (HDRS BlockSand.h BlockSapling.h BlockSideways.h - BlockSign.h + BlockSignPost.h BlockSlab.h BlockSnow.h BlockStairs.h @@ -89,6 +89,7 @@ SET (HDRS BlockTripwire.h BlockTripwireHook.h BlockVine.h + BlockWallSign.h BlockWorkbench.h BroadcastInterface.h ChunkInterface.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index afe766f13..2fe436125 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -248,17 +248,10 @@ set_source_files_properties(Bindings/Bindings.cpp PROPERTIES GENERATED TRUE) set_source_files_properties(Bindings/Bindings.h PROPERTIES GENERATED TRUE) 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") - foreach(folder ${FOLDERS}) - add_subdirectory(${folder}) - endforeach(folder) - #clear file file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/BindingDependecies.txt) foreach(dependecy ${BINDING_DEPENDECIES}) @@ -268,6 +261,10 @@ if (NOT MSVC) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "Bindings.cpp Bindings.h") + foreach(folder ${FOLDERS}) + add_subdirectory(${folder}) + endforeach(folder) + list(APPEND SOURCE "${SRCS}") list(APPEND SOURCE "${HDRS}") @@ -275,8 +272,6 @@ if (NOT MSVC) if (WIN32) list(APPEND SOURCE "Resources/MCServer.rc") endif() - - else () # MSVC-specific handling: Put all files into one project, separate by the folders: -- cgit v1.2.3 From 135dc333c131a9bde32609351e2b495c80b49f53 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 16:04:07 -0700 Subject: CMakeLists: Moved Bindings-specific code to subdir --- src/Bindings/CMakeLists.txt | 111 ++++++++++++++++++++++++++++++++++++++ src/CMakeLists.txt | 122 +++--------------------------------------- src/PolarSSL++/CMakeLists.txt | 12 +++-- 3 files changed, 125 insertions(+), 120 deletions(-) (limited to 'src') diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt index da6a6919a..723487ff0 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 2.6) project (MCServer) include_directories ("${PROJECT_SOURCE_DIR}/../") +include_directories (".") SET (SRCS Bindings.cpp @@ -31,6 +32,116 @@ SET (HDRS 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 (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} + + # add any new generation dependencies here + DEPENDS ${BINDING_DEPENDECIES} + ) +else () + 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}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2fe436125..6008d3174 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,78 +10,6 @@ set(FOLDERS 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 - 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 -) - SET (SRCS BiomeDef.cpp BlockArea.cpp @@ -207,51 +135,19 @@ SET (HDRS 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") + foreach(folder ${FOLDERS}) + add_subdirectory(${folder}) + endforeach(folder) + + get_directory_property(BINDING_DEPENDENCIES DIRECTORY "Bindings" DEFINITION BINDING_DEPENDENCIES) + #clear file file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/BindingDependecies.txt) foreach(dependecy ${BINDING_DEPENDECIES}) @@ -261,10 +157,6 @@ if (NOT MSVC) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "Bindings.cpp Bindings.h") - foreach(folder ${FOLDERS}) - add_subdirectory(${folder}) - endforeach(folder) - list(APPEND SOURCE "${SRCS}") list(APPEND SOURCE "${HDRS}") diff --git a/src/PolarSSL++/CMakeLists.txt b/src/PolarSSL++/CMakeLists.txt index 9a59cdb2c..39d41292d 100644 --- a/src/PolarSSL++/CMakeLists.txt +++ b/src/PolarSSL++/CMakeLists.txt @@ -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() -- cgit v1.2.3 From 0960e6ae8ffe329ecd78b2f0f433fcb9e817a696 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 18 Jul 2014 19:25:15 -0700 Subject: Moved Windows custom command to src/CMakeLists.txt --- src/Bindings/CMakeLists.txt | 16 +--------------- src/CMakeLists.txt | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt index 723487ff0..4726eea23 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -112,21 +112,7 @@ set(BINDING_DEPENDECIES ../World.h ) -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} - - # add any new generation dependencies here - DEPENDS ${BINDING_DEPENDECIES} - ) -else () +if (NOT WIN32) ADD_CUSTOM_COMMAND( # add any new generated bindings here OUTPUT ${BINDING_OUTPUTS} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6008d3174..168c576e2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -230,6 +230,25 @@ endif() set(EXECUTABLE MCServer) +if (WIN32) + 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 Bindings/virtual_method_hooks.lua -o Bindings/Bindings.cpp -H Bindings/Bindings.h Bindings/AllToLua.pkg + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + + # add any new generation dependencies here + DEPENDS ${BINDING_DEPENDECIES} + ) +endif() + add_executable(${EXECUTABLE} ${SOURCE}) -- cgit v1.2.3 From 9e7958e7fbb5a2477e04d30724730e15335b969f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 19 Jul 2014 13:22:16 +0200 Subject: Fixed MSVC bindings generation. --- src/Bindings/CMakeLists.txt | 2 +- src/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt index 4726eea23..95b858f5d 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -112,7 +112,7 @@ set(BINDING_DEPENDECIES ../World.h ) -if (NOT WIN32) +if (NOT MSVC) ADD_CUSTOM_COMMAND( # add any new generated bindings here OUTPUT ${BINDING_OUTPUTS} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 168c576e2..9feaf64fe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -230,7 +230,7 @@ endif() set(EXECUTABLE MCServer) -if (WIN32) +if (MSVC) get_directory_property(BINDING_OUTPUTS DIRECTORY "Bindings" DEFINITION BINDING_OUTPUTS) get_directory_property(BINDING_DEPENDENCIES DIRECTORY "Bindings" DEFINITION BINDING_DEPENDENCIES) @@ -241,8 +241,8 @@ if (WIN32) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/MCServer/lua51.dll ./lua51.dll # Regenerate bindings: - COMMAND tolua -L Bindings/virtual_method_hooks.lua -o Bindings/Bindings.cpp -H Bindings/Bindings.h Bindings/AllToLua.pkg - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + 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} -- cgit v1.2.3