summaryrefslogtreecommitdiff
path: root/lib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r--lib/CMakeLists.txt94
1 files changed, 71 insertions, 23 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 0fe8c50..8baa38d 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -3,9 +3,10 @@
########################################################################
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${GRAS_SOURCE_DIR}/tests)
set(GRAS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/../)
+set(GRAS_BINARY_DIR ${CMAKE_BINARY_DIR}/gruel/src)
+set(RUNTIME_SOURCE_DIR ${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/runtime)
########################################################################
# Setup NumaNuma
@@ -36,31 +37,50 @@ list(APPEND gnuradio_core_sources
)
#sources that are in tree that have not changed
-set(runtime_srcs_dir ${CMAKE_SOURCE_DIR}/gnuradio-core/src/lib/runtime)
list(APPEND gnuradio_core_sources
- ${runtime_srcs_dir}/gr_sys_paths.cc
- ${runtime_srcs_dir}/gr_message.cc
- ${runtime_srcs_dir}/gr_msg_queue.cc
- ${runtime_srcs_dir}/gr_msg_handler.cc
+ ${RUNTIME_SOURCE_DIR}/gr_sys_paths.cc
+ ${RUNTIME_SOURCE_DIR}/gr_message.cc
+ ${RUNTIME_SOURCE_DIR}/gr_msg_queue.cc
+ ${RUNTIME_SOURCE_DIR}/gr_msg_handler.cc
)
########################################################################
# Append gnuradio-core test sources
########################################################################
list(APPEND test_gnuradio_core_sources
- ${GRAS_SOURCE_DIR}/tests/qa_gr_block.cc
- ${GRAS_SOURCE_DIR}/tests/qa_gr_hier_block2.cc
- ${GRAS_SOURCE_DIR}/tests/qa_gr_hier_block2_derived.cc
- #${GRAS_SOURCE_DIR}/tests/qa_gr_buffer.cc
- #${GRAS_SOURCE_DIR}/tests/qa_gr_flowgraph.cc
- ${GRAS_SOURCE_DIR}/tests/qa_gr_top_block.cc
- ${GRAS_SOURCE_DIR}/tests/qa_gr_io_signature.cc
- #${GRAS_SOURCE_DIR}/tests/qa_gr_vmcircbuf.cc
- ${GRAS_SOURCE_DIR}/tests/qa_block_tags.cc
- ${GRAS_SOURCE_DIR}/tests/qa_runtime.cc
- #${GRAS_SOURCE_DIR}/tests/qa_set_msg_handler.cc
+ ${RUNTIME_SOURCE_DIR}/qa_gr_block.cc
+ ${RUNTIME_SOURCE_DIR}/qa_gr_hier_block2.cc
+ ${RUNTIME_SOURCE_DIR}/qa_gr_hier_block2_derived.cc
+ #${RUNTIME_SOURCE_DIR}/qa_gr_buffer.cc
+ #${RUNTIME_SOURCE_DIR}/qa_gr_flowgraph.cc
+ ${RUNTIME_SOURCE_DIR}/qa_gr_top_block.cc
+ ${RUNTIME_SOURCE_DIR}/qa_gr_io_signature.cc
+ #${RUNTIME_SOURCE_DIR}/qa_gr_vmcircbuf.cc
+ ${RUNTIME_SOURCE_DIR}/qa_block_tags.cc
+ ${GRAS_SOURCE_DIR}/lib/qa_runtime.cc
+ #${RUNTIME_SOURCE_DIR}/qa_set_msg_handler.cc
)
+#copy test headers to include dir
+set(test_headers
+ ${RUNTIME_SOURCE_DIR}/qa_gr_block.h
+ ${RUNTIME_SOURCE_DIR}/qa_gr_hier_block2.h
+ ${RUNTIME_SOURCE_DIR}/qa_gr_hier_block2_derived.h
+ #${RUNTIME_SOURCE_DIR}/qa_gr_buffer.h
+ #${RUNTIME_SOURCE_DIR}/qa_gr_flowgraph.h
+ ${RUNTIME_SOURCE_DIR}/qa_gr_top_block.h
+ ${RUNTIME_SOURCE_DIR}/qa_gr_io_signature.h
+ #${RUNTIME_SOURCE_DIR}/qa_gr_vmcircbuf.h
+ ${RUNTIME_SOURCE_DIR}/qa_block_tags.h
+ ${RUNTIME_SOURCE_DIR}/qa_runtime.h
+ #${RUNTIME_SOURCE_DIR}/qa_set_msg_handler.h
+ ${RUNTIME_SOURCE_DIR}/gr_unittests.h
+)
+foreach(header ${test_headers})
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${header} ${GRAS_BINARY_DIR}/include)
+endforeach(header)
+
+
########################################################################
# Find TSBE and add to libs
########################################################################
@@ -91,9 +111,22 @@ list(APPEND gnuradio_core_libs ${NUMANUMA_LIBRARIES})
########################################################################
# Install runtime headers
########################################################################
+set(runtime_copy_headers
+ ${RUNTIME_SOURCE_DIR}/gr_sys_paths.h
+ ${RUNTIME_SOURCE_DIR}/gr_message.h
+ ${RUNTIME_SOURCE_DIR}/gr_msg_queue.h
+ ${RUNTIME_SOURCE_DIR}/gr_msg_handler.h
+ ${RUNTIME_SOURCE_DIR}/gr_complex.h
+)
+
+#copy the headers to a place that is in the include path
+foreach(runtime_copy_header ${runtime_copy_headers})
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${runtime_copy_header} ${GRAS_BINARY_DIR}/include)
+endforeach(runtime_copy_header)
+
file(GLOB runtime_headers "${GRAS_SOURCE_DIR}/include/gnuradio/*")
install(FILES
- ${runtime_headers}
+ ${runtime_headers} ${runtime_copy_headers}
DESTINATION ${GR_INCLUDE_DIR}/gnuradio
COMPONENT "core_devel"
)
@@ -102,11 +135,11 @@ install(FILES
# Install swig headers
########################################################################
if(ENABLE_PYTHON)
-file(GLOB runtime_swigs "${GRAS_SOURCE_DIR}/swig/*.i")
-install(FILES
- ${runtime_swigs}
- DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
- COMPONENT "core_swig"
+
+set(runtime_copy_swigs
+ ${RUNTIME_SOURCE_DIR}/gr_message.i
+ ${RUNTIME_SOURCE_DIR}/gr_msg_queue.i
+ ${RUNTIME_SOURCE_DIR}/gr_msg_handler.i
)
#makes swig doc generator happy
@@ -115,4 +148,19 @@ execute_process(
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/runtime/nop.h
)
+#copy the headers to a place that is in the include path
+foreach(runtime_copy_header ${runtime_copy_swigs})
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig/
+ COMMAND ${CMAKE_COMMAND} -E copy ${runtime_copy_header} ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig/
+ )
+endforeach(runtime_copy_header)
+
+file(GLOB runtime_swigs "${GRAS_SOURCE_DIR}/swig/*.i")
+install(FILES
+ ${runtime_swigs} ${runtime_copy_swigs}
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "core_swig"
+)
+
endif(ENABLE_PYTHON)