diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/CMakeLists.txt | 7 | ||||
-rw-r--r-- | host/include/uhd/version.hpp.in (renamed from host/include/uhd/version.hpp) | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt index 318577b7c..f6123aa90 100644 --- a/host/include/uhd/CMakeLists.txt +++ b/host/include/uhd/CMakeLists.txt @@ -21,6 +21,11 @@ ADD_SUBDIRECTORY(usrp) ADD_SUBDIRECTORY(usrp_clock) ADD_SUBDIRECTORY(utils) +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/version.hpp.in + ${CMAKE_CURRENT_BINARY_DIR}/version.hpp +) + UHD_INSTALL(FILES config.hpp convert.hpp @@ -31,7 +36,7 @@ UHD_INSTALL(FILES property_tree.ipp property_tree.hpp stream.hpp - version.hpp + ${CMAKE_CURRENT_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_DIR}/uhd COMPONENT headers ) diff --git a/host/include/uhd/version.hpp b/host/include/uhd/version.hpp.in index 998765899..725a655c4 100644 --- a/host/include/uhd/version.hpp +++ b/host/include/uhd/version.hpp.in @@ -29,6 +29,13 @@ */ #define UHD_VERSION_ABI_STRING "3.8.0-0" +/*! + * A macro to check UHD version at compile-time. + * The value of this macro is MAJOR * 10000 + MINOR * 100 + PATCH + * (e.g., for UHD 3.8.1 this is 30801). + */ +#cmakedefine UHD_VERSION @UHD_VERSION_ADDED@ + namespace uhd{ //! Get the version string (dotted version number + build info) |