aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/CMakeLists.txt6
-rw-r--r--host/include/config.h.in24
-rw-r--r--host/include/uhd/CMakeLists.txt7
-rw-r--r--host/include/uhd/config.hpp9
-rw-r--r--host/include/uhd/transport/nirio/nirio_driver_iface.h4
-rw-r--r--host/include/uhd/version.hpp.in (renamed from host/include/uhd/version.hpp)7
6 files changed, 52 insertions, 5 deletions
diff --git a/host/include/CMakeLists.txt b/host/include/CMakeLists.txt
index 3f7ca2cb7..780213918 100644
--- a/host/include/CMakeLists.txt
+++ b/host/include/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2010 Ettus Research LLC
+# Copyright 2010,2015 Ettus Research LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,5 +15,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+)
ADD_SUBDIRECTORY(uhd)
diff --git a/host/include/config.h.in b/host/include/config.h.in
new file mode 100644
index 000000000..bd690299e
--- /dev/null
+++ b/host/include/config.h.in
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2015 Ettus Research LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#cmakedefine HAVE_LOG2
+
+/* Version macros */
+#cmakedefine UHD_VERSION_MAJOR ${TRIMMED_VERSION_MAJOR}
+#cmakedefine UHD_VERSION_MINOR ${TRIMMED_VERSION_MINOR}
+#cmakedefine UHD_VERSION_PATCH ${TRIMMED_VERSION_PATCH}
+#cmakedefine UHD_VERSION @UHD_VERSION_ADDED@
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/config.hpp b/host/include/uhd/config.hpp
index 619bd0787..173845fea 100644
--- a/host/include/uhd/config.hpp
+++ b/host/include/uhd/config.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2011,2014 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -56,6 +56,13 @@ typedef ptrdiff_t ssize_t;
#define UHD_DEPRECATED __declspec(deprecated)
#define UHD_ALIGNED(x) __declspec(align(x))
#define UHD_UNUSED(x) x
+#elif defined(__MINGW32__)
+ #define UHD_EXPORT __declspec(dllexport)
+ #define UHD_IMPORT __declspec(dllimport)
+ #define UHD_INLINE inline
+ #define UHD_DEPRECATED __declspec(deprecated)
+ #define UHD_ALIGNED(x) __declspec(align(x))
+ #define UHD_UNUSED(x) x
#elif defined(__GNUG__) && __GNUG__ >= 4
#define UHD_EXPORT __attribute__((visibility("default")))
#define UHD_IMPORT __attribute__((visibility("default")))
diff --git a/host/include/uhd/transport/nirio/nirio_driver_iface.h b/host/include/uhd/transport/nirio/nirio_driver_iface.h
index 83afd816a..3e0e56a7f 100644
--- a/host/include/uhd/transport/nirio/nirio_driver_iface.h
+++ b/host/include/uhd/transport/nirio/nirio_driver_iface.h
@@ -24,9 +24,9 @@
#include <uhd/transport/nirio/status.h>
#include <uhd/config.hpp>
#if defined(UHD_PLATFORM_WIN32)
- #include <Windows.h>
+ #include <windows.h>
#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
- #include <WinIoCtl.h>
+ #include <winioctl.h>
#pragma warning(default:4201)
#elif !defined(UHD_PLATFORM_LINUX)
#include <IOKit/IOKitLib.h>
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)