From 7c1d3b5fddf7f4c191e189b72e59a15e4d81cf59 Mon Sep 17 00:00:00 2001
From: Sergey Musikhin <musihin_sergei@mail.ru>
Date: Tue, 18 May 2021 00:10:54 +0300
Subject: [PATCH] source appears in gnuradio

---
 .gitignore                         | 1 +
 include/bladeRF/CMakeLists.txt     | 2 +-
 lib/CMakeLists.txt                 | 1 +
 python/CMakeLists.txt              | 1 +
 python/bindings/CMakeLists.txt     | 2 +-
 python/bindings/python_bindings.cc | 4 +++-
 6 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 85c92e8..1b622d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 *~
 *.pyc
 *.pyo
+*.user
 build*/
 examples/grc/*.py
diff --git a/include/bladeRF/CMakeLists.txt b/include/bladeRF/CMakeLists.txt
index ece1802..a725eb7 100644
--- a/include/bladeRF/CMakeLists.txt
+++ b/include/bladeRF/CMakeLists.txt
@@ -11,5 +11,5 @@
 ########################################################################
 install(FILES
     api.h
-    DESTINATION include/bladeRF
+    source.h DESTINATION include/bladeRF
 )
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 76b31c0..79aa971 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -12,6 +12,7 @@
 include(GrPlatform) #define LIB_SUFFIX
 
 list(APPEND bladeRF_sources
+    source_impl.cc
 )
 
 set(bladeRF_sources "${bladeRF_sources}" PARENT_SCOPE)
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 82b16ca..2c54f78 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -31,3 +31,4 @@ GR_PYTHON_INSTALL(
 include(GrTest)
 
 set(GR_TEST_TARGET_DEPS gnuradio-bladeRF)
+GR_ADD_TEST(qa_source ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_source.py)
diff --git a/python/bindings/CMakeLists.txt b/python/bindings/CMakeLists.txt
index 614a383..09e33f1 100644
--- a/python/bindings/CMakeLists.txt
+++ b/python/bindings/CMakeLists.txt
@@ -29,7 +29,7 @@ include(GrPybind)
 ########################################################################
 
 list(APPEND bladeRF_python_files
-    python_bindings.cc)
+    source_python.cc python_bindings.cc)
 
 GR_PYBIND_MAKE_OOT(bladeRF 
    ../..
diff --git a/python/bindings/python_bindings.cc b/python/bindings/python_bindings.cc
index f725429..d78a9c1 100644
--- a/python/bindings/python_bindings.cc
+++ b/python/bindings/python_bindings.cc
@@ -21,6 +21,7 @@ namespace py = pybind11;
 // Please do not delete
 /**************************************/
 // BINDING_FUNCTION_PROTOTYPES(
+    void bind_source(py::module& m);
 // ) END BINDING_FUNCTION_PROTOTYPES
 
 
@@ -49,5 +50,6 @@ PYBIND11_MODULE(bladeRF_python, m)
     // Please do not delete
     /**************************************/
     // BINDING_FUNCTION_CALLS(
+    bind_source(m);
     // ) END BINDING_FUNCTION_CALLS
-}
+}
\ No newline at end of file
-- 
GitLab