aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrej Rode <andrej.rode@ettus.com>2017-03-27 17:07:44 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:44 -0800
commit8ac9014d5c30836665378d2d088b5c602162f8ac (patch)
tree21708ce88f72da4818e73afe054b89e7f1589fdd /mpm/python/CMakeLists.txt
parent6d332e5ca4a7311406ac285f827c31c9e5b94280 (diff)
downloaduhd-8ac9014d5c30836665378d2d088b5c602162f8ac.tar.gz
uhd-8ac9014d5c30836665378d2d088b5c602162f8ac.tar.bz2
uhd-8ac9014d5c30836665378d2d088b5c602162f8ac.zip
mpm: CMake cleanup, Python code enhancements
- Send user defined data in ping - Improve rpc_shell, add mpm_debug.py, fix tracebacks in multiprocessing
Diffstat (limited to 'mpm/python/CMakeLists.txt')
-rw-r--r--mpm/python/CMakeLists.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/mpm/python/CMakeLists.txt b/mpm/python/CMakeLists.txt
index 382f244c9..7daa3bbf5 100644
--- a/mpm/python/CMakeLists.txt
+++ b/mpm/python/CMakeLists.txt
@@ -73,17 +73,21 @@ TARGET_INCLUDE_DIRECTORIES(pyusrp_periphs PUBLIC
TARGET_LINK_LIBRARIES(pyusrp_periphs ${Boost_PYTHON_LIBRARY} ${Boost_LIBRARIES} usrp-periphs)
ADD_CUSTOM_COMMAND(TARGET pyusrp_periphs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libpyusrp_periphs.so ${CMAKE_CURRENT_BINARY_DIR}/usrp_mpm/libpyusrp_periphs.so)
+SET(USRP_MPM_FILES "")
ADD_SUBDIRECTORY(usrp_mpm)
+SET(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
SET(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
SET(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
-SET(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp")
+SET(PERIPH_MGR_INIT_IN "${CMAKE_CURRENT_SOURCE_DIR}/usrp_mpm/periph_manager/__init__.py.in")
+SET(PERIPH_MGR_INIT "${CMAKE_CURRENT_BINARY_DIR}/usrp_mpm/periph_manager/__init__.py")
CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY})
+CONFIGURE_FILE(${PERIPH_MGR_INIT_IN} ${PERIPH_MGR_INIT})
ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT}
- COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}" -DBINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}" -P ${CMAKE_CURRENT_SOURCE_DIR}/copy_python_module.cmake
- COMMAND ${PYTHON} ${SETUP_PY} -q build
+ COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}" -DBINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}" -P ${CMAKE_CURRENT_SOURCE_DIR}/copy_python_module.cmake
+ COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} -q build
COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT}
DEPENDS ${USRP_MPM_FILES})
ADD_CUSTOM_TARGET(usrp_mpm ALL DEPENDS ${OUTPUT} pyusrp_periphs)
@@ -93,3 +97,6 @@ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
OUTPUT_VARIABLE USRP_MPM_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build/lib/usrp_mpm DESTINATION ${CMAKE_INSTALL_PREFIX}/${USRP_MPM_PYTHON_DIR})
+INSTALL(PROGRAMS
+ usrp_hwd.py
+ DESTINATION ${RUNTIME_DIR})