Don't do -Iexternal
It pollutes the #include space.
This commit is contained in:
parent
72df8728cf
commit
d0b20316de
7 changed files with 8 additions and 14 deletions
|
@ -354,9 +354,6 @@ set_target_properties(CSE2 PROPERTIES
|
|||
CXX_EXTENSIONS OFF
|
||||
)
|
||||
|
||||
# Include directory for third-party software
|
||||
target_include_directories(CSE2 PRIVATE "external")
|
||||
|
||||
# Name debug builds "CSE2_debug", to distinguish them
|
||||
set_target_properties(CSE2 PROPERTIES DEBUG_OUTPUT_NAME "CSE2_debug")
|
||||
|
||||
|
@ -425,7 +422,6 @@ endif()
|
|||
|
||||
if(BACKEND_RENDERER MATCHES "OpenGL3")
|
||||
target_sources(CSE2 PRIVATE "external/glad/src/glad.c" "external/glad/include/glad/glad.h" "external/glad/include/KHR/khrplatform.h")
|
||||
target_include_directories(CSE2 PRIVATE "external/glad/include")
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
target_link_libraries(CSE2 PRIVATE OpenGL::GL ${CMAKE_DL_LIBS})
|
||||
|
|
6
Makefile
6
Makefile
|
@ -51,10 +51,10 @@ ifeq ($(DEBUG_SAVE), 1)
|
|||
endif
|
||||
|
||||
ALL_CFLAGS += -std=c99 -MMD -MP -MF $@.d
|
||||
CSE2_CFLAGS += $(shell $(PKGCONFIG) sdl2 --cflags) $(shell $(PKGCONFIG) freetype2 --cflags) -Iexternal
|
||||
CSE2_CFLAGS += $(shell $(PKGCONFIG) sdl2 --cflags) $(shell $(PKGCONFIG) freetype2 --cflags)
|
||||
|
||||
ALL_CXXFLAGS += -std=c++98 -MMD -MP -MF $@.d
|
||||
CSE2_CXXFLAGS += $(shell $(PKGCONFIG) sdl2 --cflags) $(shell $(PKGCONFIG) freetype2 --cflags) -Iexternal
|
||||
CSE2_CXXFLAGS += $(shell $(PKGCONFIG) sdl2 --cflags) $(shell $(PKGCONFIG) freetype2 --cflags)
|
||||
|
||||
ifeq ($(STATIC), 1)
|
||||
ALL_LDFLAGS += -static
|
||||
|
@ -216,8 +216,6 @@ endif
|
|||
|
||||
ifeq ($(BACKEND_RENDERER), OpenGL3)
|
||||
SOURCES += src/Backends/Rendering/OpenGL3.cpp external/glad/src/glad.c
|
||||
CSE2_CFLAGS += -Iexternal/glad/include
|
||||
CSE2_CXXFLAGS += -Iexternal/glad/include
|
||||
|
||||
ifeq ($(WINDOWS), 1)
|
||||
CSE2_LIBS += -lopengl32
|
||||
|
|
2
external/glad/src/glad.c
vendored
2
external/glad/src/glad.c
vendored
|
@ -22,7 +22,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glad/glad.h>
|
||||
#include "../include/glad/glad.h"
|
||||
|
||||
static void* get_proc(const char *namez);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define MINIAUDIO_IMPLEMENTATION
|
||||
#define MA_NO_DECODING
|
||||
#define MA_API static
|
||||
#include "miniaudio.h"
|
||||
#include "../../../external/miniaudio.h"
|
||||
|
||||
#include "../../Organya.h"
|
||||
#include "../../WindowsWrapper.h"
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
#ifdef USE_OPENGLES2
|
||||
#include <GLES2/gl2.h>
|
||||
#else
|
||||
#include <glad/glad.h>
|
||||
#include "../../../external/glad/include/glad/glad.h"
|
||||
#endif
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
#define SPRITEBATCH_IMPLEMENTATION
|
||||
#include "cute_spritebatch.h"
|
||||
#include "../../../external/cute_spritebatch.h"
|
||||
|
||||
#include "../../WindowsWrapper.h"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "SDL.h"
|
||||
|
||||
#define SPRITEBATCH_IMPLEMENTATION
|
||||
#include "cute_spritebatch.h"
|
||||
#include "../../../external/cute_spritebatch.h"
|
||||
|
||||
#include "../../WindowsWrapper.h"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define STB_IMAGE_STATIC
|
||||
#define STBI_ONLY_BMP
|
||||
#define STBI_NO_LINEAR
|
||||
#include "stb_image.h"
|
||||
#include "../external/stb_image.h"
|
||||
|
||||
unsigned char* DecodeBitmap(const unsigned char *in_buffer, size_t in_buffer_size, unsigned int *width, unsigned int *height)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue