From ee8419701472be9f24c51a41ee7b7ef3cf38f329 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Wed, 29 Aug 2018 01:51:25 +0100 Subject: Force all headers other than "Globals.h" to be included with relative paths (#4269) Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work. --- src/Mobs/CMakeLists.txt | 3 --- src/Mobs/Horse.cpp | 2 +- src/Mobs/Horse.h | 2 +- src/Mobs/Monster.cpp | 2 +- src/Mobs/PassiveMonster.cpp | 2 +- src/Mobs/Sheep.cpp | 2 +- src/Mobs/Skeleton.cpp | 2 +- src/Mobs/Slime.cpp | 4 ++-- src/Mobs/Villager.h | 2 +- src/Mobs/Witch.cpp | 2 +- src/Mobs/ZombiePigman.cpp | 2 +- 11 files changed, 11 insertions(+), 14 deletions(-) (limited to 'src/Mobs') diff --git a/src/Mobs/CMakeLists.txt b/src/Mobs/CMakeLists.txt index fedff213b..d9969cfdc 100644 --- a/src/Mobs/CMakeLists.txt +++ b/src/Mobs/CMakeLists.txt @@ -1,6 +1,3 @@ -project (Cuberite) - -include_directories ("${PROJECT_SOURCE_DIR}/../") SET (SRCS AggressiveMonster.cpp diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp index 9e04bf106..61b25e7a3 100644 --- a/src/Mobs/Horse.cpp +++ b/src/Mobs/Horse.cpp @@ -4,7 +4,7 @@ #include "../World.h" #include "../EffectID.h" #include "../Entities/Player.h" -#include "UI/HorseWindow.h" +#include "../UI/HorseWindow.h" diff --git a/src/Mobs/Horse.h b/src/Mobs/Horse.h index 38625001e..68ad82b56 100644 --- a/src/Mobs/Horse.h +++ b/src/Mobs/Horse.h @@ -2,7 +2,7 @@ #pragma once #include "PassiveMonster.h" -#include "UI/WindowOwner.h" +#include "../UI/WindowOwner.h" diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 5327da832..dfcd0dd6a 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -11,7 +11,7 @@ #include "../Entities/Player.h" #include "../Entities/ExpOrb.h" #include "../MonsterConfig.h" -#include "BoundingBox.h" +#include "../BoundingBox.h" #include "../Chunk.h" #include "../FastRandom.h" diff --git a/src/Mobs/PassiveMonster.cpp b/src/Mobs/PassiveMonster.cpp index cd0f59153..17b9bddb3 100644 --- a/src/Mobs/PassiveMonster.cpp +++ b/src/Mobs/PassiveMonster.cpp @@ -4,7 +4,7 @@ #include "PassiveMonster.h" #include "../World.h" #include "../Entities/Player.h" -#include "BoundingBox.h" +#include "../BoundingBox.h" #include "../Items/ItemSpawnEgg.h" diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp index 415379034..3276e45a2 100644 --- a/src/Mobs/Sheep.cpp +++ b/src/Mobs/Sheep.cpp @@ -5,7 +5,7 @@ #include "../Entities/Player.h" #include "../World.h" #include "../EffectID.h" -#include "FastRandom.h" +#include "../FastRandom.h" diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp index e48991a06..2a8ca3ddb 100644 --- a/src/Mobs/Skeleton.cpp +++ b/src/Mobs/Skeleton.cpp @@ -4,7 +4,7 @@ #include "Skeleton.h" #include "../World.h" #include "../Entities/ArrowEntity.h" -#include "ClientHandle.h" +#include "../ClientHandle.h" diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp index 291a3a57f..3198ce801 100644 --- a/src/Mobs/Slime.cpp +++ b/src/Mobs/Slime.cpp @@ -2,8 +2,8 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "Slime.h" -#include "FastRandom.h" -#include "World.h" +#include "../FastRandom.h" +#include "../World.h" diff --git a/src/Mobs/Villager.h b/src/Mobs/Villager.h index 6f3e7b4e8..b9a0b7675 100644 --- a/src/Mobs/Villager.h +++ b/src/Mobs/Villager.h @@ -2,7 +2,7 @@ #pragma once #include "PassiveMonster.h" -#include "Blocks/ChunkInterface.h" +#include "../Blocks/ChunkInterface.h" diff --git a/src/Mobs/Witch.cpp b/src/Mobs/Witch.cpp index 3f56108ae..a4c81a63e 100644 --- a/src/Mobs/Witch.cpp +++ b/src/Mobs/Witch.cpp @@ -2,7 +2,7 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "Witch.h" -#include "FastRandom.h" +#include "../FastRandom.h" diff --git a/src/Mobs/ZombiePigman.cpp b/src/Mobs/ZombiePigman.cpp index 2581d3751..7355c8201 100644 --- a/src/Mobs/ZombiePigman.cpp +++ b/src/Mobs/ZombiePigman.cpp @@ -2,7 +2,7 @@ #include "ZombiePigman.h" #include "../World.h" -#include "ClientHandle.h" +#include "../ClientHandle.h" -- cgit v1.2.3