Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force includes to use relative paths #4269

Merged
merged 2 commits into from Aug 29, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/Bindings/CMakeLists.txt
@@ -1,7 +1,3 @@
project (Cuberite)

include_directories ("${PROJECT_SOURCE_DIR}/../")
include_directories (".")

SET (SRCS
Bindings.cpp
Expand Down
4 changes: 2 additions & 2 deletions src/Bindings/LuaWindow.cpp
Expand Up @@ -7,9 +7,9 @@
#include "../Entities/Player.h"
#include "../UI/SlotArea.h"
#include "PluginLua.h"
#include "Root.h"
#include "lua/src/lauxlib.h" // Needed for LUA_REFNIL
#include "ClientHandle.h"
#include "../Root.h"
#include "../ClientHandle.h"



Expand Down
4 changes: 2 additions & 2 deletions src/Bindings/ManualBindings_RankManager.cpp
Expand Up @@ -5,10 +5,10 @@

#include "Globals.h"
#include "ManualBindings.h"
#include "../Root.h"
#include "tolua++/include/tolua++.h"
#include "LuaState.h"
#include "UUID.h"
#include "../Root.h"
#include "../UUID.h"



Expand Down
2 changes: 1 addition & 1 deletion src/Bindings/Plugin.h
Expand Up @@ -9,7 +9,7 @@

#pragma once

#include "Defines.h"
#include "../Defines.h"
#include "PluginManager.h"


Expand Down
4 changes: 2 additions & 2 deletions src/Bindings/PluginManager.h
Expand Up @@ -2,8 +2,8 @@
#pragma once


#include "Defines.h"
#include "FunctionRef.h"
#include "../Defines.h"
#include "../FunctionRef.h"



Expand Down
2 changes: 1 addition & 1 deletion src/BlockEntities/BlockEntityWithItems.h
Expand Up @@ -12,7 +12,7 @@
#include "BlockEntity.h"
#include "../ItemGrid.h"
#include "../UI/WindowOwner.h"
#include "World.h"
#include "../World.h"



Expand Down
3 changes: 0 additions & 3 deletions src/BlockEntities/CMakeLists.txt
@@ -1,6 +1,3 @@
project (Cuberite)

include_directories ("${PROJECT_SOURCE_DIR}/../")

SET (SRCS
BeaconEntity.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/BlockEntities/EnderChestEntity.h
Expand Up @@ -2,7 +2,7 @@
#pragma once

#include "BlockEntity.h"
#include "UI/WindowOwner.h"
#include "../UI/WindowOwner.h"



Expand Down
2 changes: 1 addition & 1 deletion src/BlockEntities/FlowerPotEntity.h
Expand Up @@ -9,7 +9,7 @@
#pragma once

#include "BlockEntity.h"
#include "Item.h"
#include "../Item.h"



Expand Down
2 changes: 1 addition & 1 deletion src/BlockEntities/JukeboxEntity.cpp
Expand Up @@ -5,7 +5,7 @@
#include "../World.h"
#include "../EffectID.h"
#include "json/value.h"
#include "Entities/Player.h"
#include "../Entities/Player.h"



Expand Down
4 changes: 2 additions & 2 deletions src/BlockEntities/MobHeadEntity.h
Expand Up @@ -9,8 +9,8 @@
#pragma once

#include "BlockEntity.h"
#include "Defines.h"
#include "UUID.h"
#include "../Defines.h"
#include "../UUID.h"



Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/BlockBed.cpp
Expand Up @@ -5,7 +5,7 @@
#include "BlockBed.h"

#include "BroadcastInterface.h"
#include "Entities/Player.h"
#include "../Entities/Player.h"
#include "../World.h"
#include "../BoundingBox.h"
#include "../Mobs/Monster.h"
Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/BlockButton.h
@@ -1,7 +1,7 @@
#pragma once

#include "BlockHandler.h"
#include "Chunk.h"
#include "../Chunk.h"
#include "MetaRotator.h"


Expand Down
4 changes: 2 additions & 2 deletions src/Blocks/BlockDirt.h
Expand Up @@ -3,8 +3,8 @@

#include "BlockHandler.h"
#include "../FastRandom.h"
#include "Root.h"
#include "Bindings/PluginManager.h"
#include "../Root.h"
#include "../Bindings/PluginManager.h"



Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/BlockDoor.h
Expand Up @@ -3,7 +3,7 @@

#include "BlockHandler.h"
#include "../Entities/Player.h"
#include "Chunk.h"
#include "../Chunk.h"
#include "MetaRotator.h"
#include "ChunkInterface.h"
#include "BlockSlab.h"
Expand Down
4 changes: 2 additions & 2 deletions src/Blocks/BlockFence.h
Expand Up @@ -4,8 +4,8 @@
#include "BlockHandler.h"
#include "../BoundingBox.h"
#include "../EffectID.h"
#include "Entities/LeashKnot.h"
#include "BoundingBox.h"
#include "../Entities/LeashKnot.h"
#include "../BoundingBox.h"
#include "../Mobs/PassiveMonster.h"


Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/BlockPiston.cpp
Expand Up @@ -4,7 +4,7 @@
#include "../Item.h"
#include "../World.h"
#include "../Entities/Player.h"
#include "BlockInServerPluginInterface.h"
#include "../BlockInServerPluginInterface.h"
#include "ChunkInterface.h"


Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/BlockRedstoneRepeater.h
Expand Up @@ -2,10 +2,10 @@
#pragma once

#include "BlockHandler.h"
#include "Chunk.h"
#include "MetaRotator.h"
#include "ChunkInterface.h"
#include "BlockSlab.h"
#include "../Chunk.h"



Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/BlockSignPost.h
Expand Up @@ -2,7 +2,7 @@
#pragma once

#include "BlockHandler.h"
#include "Chunk.h"
#include "../Chunk.h"



Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/BlockWallSign.h
Expand Up @@ -2,7 +2,7 @@
#pragma once

#include "BlockHandler.h"
#include "Chunk.h"
#include "../Chunk.h"



Expand Down
4 changes: 2 additions & 2 deletions src/Blocks/BroadcastInterface.h
@@ -1,8 +1,8 @@

#pragma once

#include "Defines.h"
#include "Scoreboard.h"
#include "../Defines.h"
#include "../Scoreboard.h"

// fwd:
class cClientHandle;
Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/ChunkInterface.cpp
Expand Up @@ -2,9 +2,9 @@
#include "Globals.h"

#include "ChunkInterface.h"
#include "ChunkMap.h"
#include "BlockHandler.h"
#include "WorldInterface.h"
#include "../ChunkMap.h"



Expand Down
3 changes: 2 additions & 1 deletion src/Blocks/WorldInterface.h
@@ -1,7 +1,7 @@

#pragma once

#include "FunctionRef.h"
#include "../FunctionRef.h"
#include "../Mobs/MonsterTypes.h"

class cBedEntity;
Expand All @@ -13,6 +13,7 @@ class cPlayer;
using cBedCallback = cFunctionRef<bool(cBedEntity &)>;
using cBlockEntityCallback = cFunctionRef<bool(cBlockEntity &)>;
using cPlayerListCallback = cFunctionRef<bool(cPlayer &)>;
using cEntityCallback = cFunctionRef<bool(cEntity &)>;



Expand Down
7 changes: 4 additions & 3 deletions src/CMakeLists.txt
Expand Up @@ -159,7 +159,10 @@ SET (HDRS
XMLParser.h
)

include_directories(".")
file(WRITE "${CMAKE_BINARY_DIR}/include/Globals.h"
"/* This file allows Globals.h to be included with an absolute path */\n#include \"${PROJECT_SOURCE_DIR}/Globals.h\"\n")

include_directories("${CMAKE_BINARY_DIR}/include")
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../lib/sqlite")
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../lib/SQLiteCpp/include")
include_directories (SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/../lib/TCLAP/include")
Expand Down Expand Up @@ -245,8 +248,6 @@ else ()
includefolder("Resources")
source_group("" FILES ${SOURCE})

include_directories("${PROJECT_SOURCE_DIR}")

# Precompiled headers (1st part)
SET_SOURCE_FILES_PROPERTIES(
Globals.cpp PROPERTIES COMPILE_FLAGS "/Yc\"Globals.h\""
Expand Down
3 changes: 0 additions & 3 deletions src/Entities/CMakeLists.txt
@@ -1,6 +1,3 @@
project (Cuberite)

include_directories ("${PROJECT_SOURCE_DIR}/../")

SET (SRCS
ArrowEntity.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/EnderCrystal.cpp
Expand Up @@ -2,7 +2,7 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules

#include "EnderCrystal.h"
#include "ClientHandle.h"
#include "../ClientHandle.h"
#include "../Chunk.h"
#include "../World.h"

Expand Down
4 changes: 2 additions & 2 deletions src/Entities/Entity.cpp
Expand Up @@ -2,6 +2,7 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules

#include "Entity.h"
#include "Player.h"
#include "../World.h"
#include "../Root.h"
#include "../Matrix4.h"
Expand All @@ -10,8 +11,7 @@
#include "../Simulator/FluidSimulator.h"
#include "../Bindings/PluginManager.h"
#include "../LineBlockTracer.h"
#include "Player.h"
#include "Items/ItemHandler.h"
#include "../Items/ItemHandler.h"
#include "../FastRandom.h"
#include "../NetherPortalScanner.h"
#include "../BoundingBox.h"
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/HangingEntity.cpp
Expand Up @@ -2,8 +2,8 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules

#include "HangingEntity.h"
#include "ClientHandle.h"
#include "Player.h"
#include "../ClientHandle.h"



Expand Down
2 changes: 1 addition & 1 deletion src/Entities/ItemFrame.cpp
Expand Up @@ -2,8 +2,8 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules

#include "ItemFrame.h"
#include "ClientHandle.h"
#include "Player.h"
#include "../ClientHandle.h"



Expand Down
6 changes: 3 additions & 3 deletions src/Entities/LeashKnot.cpp
Expand Up @@ -2,10 +2,10 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules

#include "LeashKnot.h"
#include "ClientHandle.h"
#include "Player.h"
#include "Mobs/Monster.h"
#include "BoundingBox.h"
#include "../Mobs/Monster.h"
#include "../BoundingBox.h"
#include "../ClientHandle.h"

// Ticks to wait in Tick function to optimize calculations
#define TICK_STEP 10
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Minecart.h
Expand Up @@ -10,7 +10,7 @@
#pragma once

#include "Entity.h"
#include "World.h"
#include "../World.h"
#include "../UI/WindowOwner.h"


Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Painting.cpp
Expand Up @@ -2,8 +2,8 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules

#include "Painting.h"
#include "ClientHandle.h"
#include "Player.h"
#include "../ClientHandle.h"
#include "../Chunk.h"


Expand Down
4 changes: 2 additions & 2 deletions src/Entities/Pawn.cpp
Expand Up @@ -5,9 +5,9 @@
#include "Player.h"
#include "../World.h"
#include "../Bindings/PluginManager.h"
#include "BoundingBox.h"
#include "../BoundingBox.h"
#include "../Blocks/BlockHandler.h"
#include "EffectID.h"
#include "../EffectID.h"
#include "../Mobs/Monster.h"


Expand Down
4 changes: 2 additions & 2 deletions src/Entities/Player.cpp
Expand Up @@ -4,8 +4,8 @@
#include <unordered_map>

#include "Player.h"
#include "Mobs/Wolf.h"
#include "Mobs/Horse.h"
#include "../Mobs/Wolf.h"
#include "../Mobs/Horse.h"
#include "../BoundingBox.h"
#include "../ChatColor.h"
#include "../Server.h"
Expand Down
3 changes: 0 additions & 3 deletions src/Generating/CMakeLists.txt
@@ -1,6 +1,3 @@
project (Cuberite)

include_directories ("${PROJECT_SOURCE_DIR}/../")

SET (SRCS
BioGen.cpp
Expand Down
4 changes: 2 additions & 2 deletions src/Generating/ChunkGenerator.cpp
Expand Up @@ -2,11 +2,11 @@
#include "Globals.h"

#include "ChunkGenerator.h"
#include "../IniFile.h"
#include "ChunkDesc.h"
#include "ComposableGenerator.h"
#include "Noise3DGenerator.h"
#include "FastRandom.h"
#include "../IniFile.h"
#include "../FastRandom.h"



Expand Down
2 changes: 1 addition & 1 deletion src/Generating/PieceStructuresGen.cpp
Expand Up @@ -7,7 +7,7 @@
#include "PieceStructuresGen.h"
#include "PrefabStructure.h"
#include "PieceGeneratorBFSTree.h"
#include "IniFile.h"
#include "../IniFile.h"
#include "../Stopwatch.h"


Expand Down