From 9400226ebd445456aac5ad37513dccb578fcc82d Mon Sep 17 00:00:00 2001 From: pantor Date: Fri, 23 Feb 2018 12:42:59 +0100 Subject: [PATCH 1/5] add meson build interface --- meson.build | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..1d5f480 --- /dev/null +++ b/meson.build @@ -0,0 +1,7 @@ +project('inja', 'cpp') + +inja_inc = include_directories('src') + +inja_dep = declare_dependency( + include_directories : inja_inc +) From ffe25364c07c7161c2afd40e6f736368c75352ec Mon Sep 17 00:00:00 2001 From: pantor Date: Fri, 23 Feb 2018 12:43:07 +0100 Subject: [PATCH 2/5] add copyright header to inja.hpp --- src/inja.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/inja.hpp b/src/inja.hpp index 9ea9cee..d639e89 100644 --- a/src/inja.hpp +++ b/src/inja.hpp @@ -1,3 +1,30 @@ +/* +Inja - A Template Engine for Modern C++ +version 1.0.0 +https://github.com/pantor/inja + +Licensed under the MIT License . +Copyright (c) 2017-2018 Pantor . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + #ifndef PANTOR_INJA_HPP #define PANTOR_INJA_HPP From 577301773d0833632151813645756ec792a0cbdc Mon Sep 17 00:00:00 2001 From: pantor Date: Fri, 23 Feb 2018 12:44:21 +0100 Subject: [PATCH 3/5] add version definitions --- src/inja.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/inja.hpp b/src/inja.hpp index d639e89..a69c6ad 100644 --- a/src/inja.hpp +++ b/src/inja.hpp @@ -28,6 +28,11 @@ SOFTWARE. #ifndef PANTOR_INJA_HPP #define PANTOR_INJA_HPP +#define PANTOR_INJA_VERSION_MAJOR 1 +#define PANTOR_INJA_VERSION_MINOR 0 +#define PANTOR_INJA_VERSION_PATCH 0 + + #ifndef NLOHMANN_JSON_HPP static_assert(false, "nlohmann/json not found."); #endif From 4d0ceda62d5825afe1536c7dca7e395dbfdaf799 Mon Sep 17 00:00:00 2001 From: pantor Date: Fri, 23 Feb 2018 12:49:47 +0100 Subject: [PATCH 4/5] add meson build interface to readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cba9493..fa86639 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ inja::render("Hello {{ name }}!", data); // Returns "Hello world!" ## Integration -Inja is a headers only library, which can be downloaded in the releases or directly from the `src/` folder. Inja uses json by nlohmann as its single dependency, so make sure that it is included before inja. json can be found [here](https://github.com/nlohmann/json/releases). +Inja is a headers only library, which can be downloaded from the [releases](https://github.com/pantor/inja/releases) or directly from the `src/` folder. Inja uses json by nlohmann as its single dependency, so make sure that it is included before inja. json can be found [here](https://github.com/nlohmann/json/releases). ```c++ #include "json.hpp" @@ -35,6 +35,8 @@ using json = nlohmann::json; You can also integrate inja in your project using [Hunter](https://github.com/ruslo/hunter), a package manager for C++. +If you are using the [Meson Build System](http://mesonbuild.com), then you can wrap this repository as a subproject. + ## Tutorial From bd4c56bf6736d07bb706ab9b6cf7b4d2c8fc13e0 Mon Sep 17 00:00:00 2001 From: pantor Date: Fri, 23 Feb 2018 12:51:52 +0100 Subject: [PATCH 5/5] set inja release version to 1.0.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ce073e..97d90dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ endif() ## PROJECT ## name and version ## -project(inja LANGUAGES CXX VERSION 0.1) +project(inja LANGUAGES CXX VERSION 1.0.0) set(INJA_VERSION ${PROJECT_VERSION}) ##