diff options
author | Victor Popov <v.popov@corp.mail.ru> | 2019-01-15 14:57:13 +0300 |
---|---|---|
committer | Sergey Yershov <syershov@maps.me> | 2019-01-15 17:19:36 +0300 |
commit | a6898bfebefb6e321e6bf842afbbf844ffc2012f (patch) | |
tree | f23d110ce23c23fd9c9e0bf368c4baab1834d3be /kml | |
parent | 3b0ffdef5e219da480ac57ec4c122b79a938c8aa (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 'kml')
-rw-r--r-- | kml/pykmlib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | kml/pykmlib/bindings.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/kml/pykmlib/CMakeLists.txt b/kml/pykmlib/CMakeLists.txt index 2bd7a03a41..d7418de919 100644 --- a/kml/pykmlib/CMakeLists.txt +++ b/kml/pykmlib/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/kml/pykmlib/bindings.cpp b/kml/pykmlib/bindings.cpp index a14cd9cf37..b948b487fa 100644 --- a/kml/pykmlib/bindings.cpp +++ b/kml/pykmlib/bindings.cpp @@ -29,6 +29,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" @@ -642,6 +643,7 @@ std::string IndexToClassificatorType(uint32_t index) BOOST_PYTHON_MODULE(pykmlib) { + scope().attr("__version__") = PYBINDINGS_VERSION; register_exception_translator<std::runtime_error>(&TranslateRuntimeError); TimestampConverter(); LatLonConverter(); |