From 9a0a6b9da60cad119bbb2cb192fd0ce12c3afaf4 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Fri, 5 Sep 2014 05:00:06 +0400 Subject: [PATCH] Add Config.hh to record build-time settings --- CMakeLists.txt | 8 ++++++++ SDL2pp/Config.hh.in | 27 +++++++++++++++++++++++++++ SDL2pp/SDL2pp.hh | 2 ++ 3 files changed, 37 insertions(+) create mode 100644 SDL2pp/Config.hh.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 292a325..c92d91d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,14 @@ ENDIF(MSVC) INCLUDE_DIRECTORIES(BEFORE ${PROJECT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${SDL2_ALL_INCLUDE_DIRS}) +# config.h +CONFIGURE_FILE( + SDL2pp/Config.hh.in + SDL2pp/Config.hh +) + +INCLUDE_DIRECTORIES(BEFORE ${PROJECT_BINARY_DIR}) + # sources SET(LIBRARY_SOURCES SDL2pp/Exception.cc diff --git a/SDL2pp/Config.hh.in b/SDL2pp/Config.hh.in new file mode 100644 index 0000000..75af7f2 --- /dev/null +++ b/SDL2pp/Config.hh.in @@ -0,0 +1,27 @@ +/* + libSDL2pp - C++ wrapper for libSDL2 + Copyright (C) 2014 Dmitry Marakasov + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef SDL2PP_CONFIG_HH +#define SDL2PP_CONFIG_HH + +#cmakedefine SDL2PP_WITH_IMAGE + +#endif diff --git a/SDL2pp/SDL2pp.hh b/SDL2pp/SDL2pp.hh index 9f92245..a4ffd40 100644 --- a/SDL2pp/SDL2pp.hh +++ b/SDL2pp/SDL2pp.hh @@ -23,6 +23,8 @@ #define SDL2PP_SDL2PP_HH #include +#include + #include #include #include