Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Popov <v.popov@corp.mail.ru>2019-01-15 14:57:13 +0300
committerSergey Yershov <syershov@maps.me>2019-01-15 17:19:36 +0300
commita6898bfebefb6e321e6bf842afbbf844ffc2012f (patch)
treef23d110ce23c23fd9c9e0bf368c4baab1834d3be /local_ads/pylocal_ads
parent3b0ffdef5e219da480ac57ec4c122b79a938c8aa (diff)
Add version to all PYBINDINGS modules.
Make all modules have externally-specified (by build script) version. It must be externally specified since we can't know which tag the code was checked out from.
Diffstat (limited to 'local_ads/pylocal_ads')
-rw-r--r--local_ads/pylocal_ads/CMakeLists.txt2
-rw-r--r--local_ads/pylocal_ads/bindings.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/local_ads/pylocal_ads/CMakeLists.txt b/local_ads/pylocal_ads/CMakeLists.txt
index 71fb9743f1..53dc2b4a70 100644
--- a/local_ads/pylocal_ads/CMakeLists.txt
+++ b/local_ads/pylocal_ads/CMakeLists.txt
@@ -5,6 +5,8 @@ set(
bindings.cpp
)
+include_directories(${CMAKE_BINARY_DIR})
+
omim_add_library(${PROJECT_NAME} MODULE ${SRC})
omim_link_libraries(
diff --git a/local_ads/pylocal_ads/bindings.cpp b/local_ads/pylocal_ads/bindings.cpp
index d2cfaaccd4..887a01fe5b 100644
--- a/local_ads/pylocal_ads/bindings.cpp
+++ b/local_ads/pylocal_ads/bindings.cpp
@@ -15,6 +15,7 @@
#pragma clang diagnostic ignored "-Wunused-local-typedef"
#endif
+#include "pyhelpers/module_version.hpp"
#include "pyhelpers/vector_uint8.hpp"
#include "pyhelpers/vector_list_conversion.hpp"
@@ -47,6 +48,7 @@ boost::python::list PyDeserialize(std::vector<uint8_t> const & blob)
BOOST_PYTHON_MODULE(pylocal_ads)
{
using namespace boost::python;
+ scope().attr("__version__") = PYBINDINGS_VERSION;
// Register the to-python converters.
to_python_converter<std::vector<uint8_t>, vector_uint8t_to_str>();