better access to townengine headers from any point in source tree
This commit is contained in:
parent
09f2f82d27
commit
922e521867
@ -162,7 +162,7 @@ function(link_and_include_deps target)
|
|||||||
# header-only libraries should be marked as "system includes"
|
# header-only libraries should be marked as "system includes"
|
||||||
# to suppress compiler warnings in their code (it's not my problem after all)
|
# to suppress compiler warnings in their code (it's not my problem after all)
|
||||||
target_include_directories(${target}
|
target_include_directories(${target}
|
||||||
SYSTEM
|
SYSTEM
|
||||||
PRIVATE
|
PRIVATE
|
||||||
third-party/physfs/src
|
third-party/physfs/src
|
||||||
third-party/physfs/extras
|
third-party/physfs/extras
|
||||||
@ -171,6 +171,9 @@ function(link_and_include_deps target)
|
|||||||
third-party/stb
|
third-party/stb
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# allow access to headers from any point in source tree
|
||||||
|
target_include_directories(${target} PRIVATE ./)
|
||||||
|
|
||||||
target_link_libraries(${target} PUBLIC
|
target_link_libraries(${target} PUBLIC
|
||||||
SDL2::SDL2
|
SDL2::SDL2
|
||||||
SDL2::SDL2main
|
SDL2::SDL2main
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "../textures.h"
|
#include "townengine/game_api.h"
|
||||||
#include "../game_api.h"
|
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "scenes/scene.h"
|
#include "scenes/scene.h"
|
||||||
#include "scenes/title.h"
|
#include "scenes/title.h"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define GAME_H
|
#define GAME_H
|
||||||
|
|
||||||
|
|
||||||
#include "../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
#include "../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
|
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define PLAYER_H
|
#define PLAYER_H
|
||||||
|
|
||||||
|
|
||||||
#include "../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
|
|
||||||
|
|
||||||
struct world;
|
struct world;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "title.h"
|
#include "title.h"
|
||||||
#include "scene.h"
|
#include "scene.h"
|
||||||
|
|
||||||
#include "../../audio.h"
|
#include "townengine/game_api.h"
|
||||||
|
|
||||||
|
|
||||||
static void ingame_tick(struct state *state) {
|
static void ingame_tick(struct state *state) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define INGAME_H
|
#define INGAME_H
|
||||||
|
|
||||||
|
|
||||||
#include "../../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
#include "../state.h"
|
#include "../state.h"
|
||||||
#include "scene.h"
|
#include "scene.h"
|
||||||
#include "../player.h"
|
#include "../player.h"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "ingame.h"
|
#include "ingame.h"
|
||||||
#include "../world.h"
|
#include "../world.h"
|
||||||
#include "../player.h"
|
#include "../player.h"
|
||||||
#include "../../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
|
|
||||||
|
|
||||||
static void title_tick(struct state *state) {
|
static void title_tick(struct state *state) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define TITLE_H
|
#define TITLE_H
|
||||||
|
|
||||||
|
|
||||||
#include "../../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
#include "../state.h"
|
#include "../state.h"
|
||||||
#include "scene.h"
|
#include "scene.h"
|
||||||
#include "../player.h"
|
#include "../player.h"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define STATE_H
|
#define STATE_H
|
||||||
|
|
||||||
|
|
||||||
#include "../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
|
|
||||||
|
|
||||||
struct state {
|
struct state {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "world.h"
|
#include "world.h"
|
||||||
#include "../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef WORLD_H
|
#ifndef WORLD_H
|
||||||
#define WORLD_H
|
#define WORLD_H
|
||||||
|
|
||||||
#include "../game_api.h"
|
#include "townengine/game_api.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
1
townengine
Symbolic link
1
townengine
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
src
|
Loading…
Reference in New Issue
Block a user