Add Configure Header

This commit is contained in:
Kirigaya Kazuto 2017-05-16 16:27:35 +08:00
parent 6901b0054c
commit 65435476b6
3 changed files with 26 additions and 23 deletions

View File

@ -1,31 +1,10 @@
#pragma once
#ifdef _MSC_VER
/// Visual Studio (VC++ Compiler)
#include <SDL.h>
#undef main
#include <SDL_image.h>
#include <SDL_ttf.h>
#include <SDL_mixer.h>
/// VC++ does not implied C++ exception. Use this to ignore compile warning on this.
#pragma warning (disable:4290)
#else
/// CodeBlocks (MinGW Compiler)
#include <SDL2/SDL.h>
#undef main
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_mixer.h>
#endif
#include "MiniEngine_Config.h"
#include <string>
#include <memory>
#include <functional>
#include <vector>
#define _DECL_DEPRECATED [[deprecated]]
namespace MiniEngine
{

23
MiniEngine_Config.h Normal file
View File

@ -0,0 +1,23 @@
#pragma once
#ifdef _MSC_VER
/// Visual Studio (VC++ Compiler)
#include <SDL.h>
#undef main
#include <SDL_image.h>
#include <SDL_ttf.h>
#include <SDL_mixer.h>
/// VC++ does not implied C++ exception. Use this to ignore compile warning on this.
#pragma warning (disable:4290)
#else
/// CodeBlocks (MinGW Compiler)
#include <SDL2/SDL.h>
#undef main
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_mixer.h>
#endif /// End of #ifdef _MSC_VER
#define _DECL_DEPRECATED [[deprecated]]

View File

@ -1,7 +1,8 @@
#pragma once
#include "MiniEngine.h"
#include "MiniEngine_Config.h"
#include <map>
#include <list>
#include <functional>
typedef SDL_Event Event;
typedef decltype(Event::type) _SDLEventType_;