diff --git a/package.json b/package.json index 2cea0909..37d74d94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v8pp", - "version": "1.6.0", + "version": "1.7.0", "description": "C++ bindings for V8", "keywords": [ "V8", "native", "addon", "module", "bindings" ], "engines": { "node": ">=8.0.0" }, @@ -10,7 +10,7 @@ "license": "BSL-1.0", "bugs": { "url": "https://github.com/pmed/v8pp/issues" }, "homepage": "https://github.com/pmed/v8pp#readme", - "files": ["docs", "examples", "v8pp/*.hpp", "v8pp/*.ipp", "include_dirs.js", + "files": ["docs", "examples", "v8pp/*.hpp", "v8pp/*.ipp", "v8pp/*.cpp", "include_dirs.js", "COPYING", "LICENSE_1_0.txt", "README.md" ] } diff --git a/test/main.cpp b/test/main.cpp index 637b458e..312d16ff 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -17,6 +17,7 @@ #include #include "v8pp/context.hpp" +#include "v8pp/version.hpp" void run_tests() { @@ -93,6 +94,7 @@ int main(int argc, char const * argv[]) else if (arg == "-v" || arg == "--version") { std::cout << "V8 version " << v8::V8::GetVersion() << std::endl; + std::cout << "v8pp version " << v8pp::version() << std::endl; } else if (arg == "--lib-path") { diff --git a/v8pp/v8pp.vcxproj b/v8pp/v8pp.vcxproj index dd9865b7..0e15bca2 100644 --- a/v8pp/v8pp.vcxproj +++ b/v8pp/v8pp.vcxproj @@ -32,6 +32,7 @@ + @@ -50,12 +51,14 @@ + + {2E6CFC3D-5A08-4909-8D1A-3469063D169B} diff --git a/v8pp/v8pp.vcxproj.filters b/v8pp/v8pp.vcxproj.filters index 49e2cc47..4ec442c8 100644 --- a/v8pp/v8pp.vcxproj.filters +++ b/v8pp/v8pp.vcxproj.filters @@ -6,6 +6,7 @@ + @@ -24,9 +25,11 @@ + + diff --git a/v8pp/version.cpp b/v8pp/version.cpp new file mode 100644 index 00000000..2b56d6de --- /dev/null +++ b/v8pp/version.cpp @@ -0,0 +1,5 @@ +#include "v8pp/version.hpp" + +#if !V8PP_HEADER_ONLY +#include "v8pp/version.ipp" +#endif diff --git a/v8pp/version.hpp b/v8pp/version.hpp new file mode 100644 index 00000000..a156dc51 --- /dev/null +++ b/v8pp/version.hpp @@ -0,0 +1,24 @@ +// +// Copyright (c) 2013-2016 Pavel Medvedev. All rights reserved. +// +// This file is part of v8pp (https://github.com/pmed/v8pp) project. +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +#ifndef V8PP_VERSION_HPP_INCLUDED +#define V8PP_VERSION_HPP_INCLUDED + +#include "v8pp/config.hpp" + +namespace v8pp { + +char const* version(); + +} + +#if V8PP_HEADER_ONLY +#include "v8pp/version.ipp" +#endif + +#endif // V8PP_VERSION_HPP_INCLUDED diff --git a/v8pp/version.ipp b/v8pp/version.ipp new file mode 100644 index 00000000..d1b91d10 --- /dev/null +++ b/v8pp/version.ipp @@ -0,0 +1,10 @@ +#include "v8pp/version.hpp" + +namespace v8pp { + +V8PP_IMPL char const* version() +{ + return "1.7.0"; +} + +} // namespace v8pp