diff options
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r-- | host/lib/CMakeLists.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index 3335cfec9..37f73f108 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -69,6 +69,7 @@ LIBUHD_REGISTER_COMPONENT("USRP1" ENABLE_USRP1 ON "ENABLE_LIBUHD;ENABLE_USB" OFF LIBUHD_REGISTER_COMPONENT("USRP2" ENABLE_USRP2 ON "ENABLE_LIBUHD" OFF OFF) LIBUHD_REGISTER_COMPONENT("X300" ENABLE_X300 ON "ENABLE_LIBUHD" OFF OFF) LIBUHD_REGISTER_COMPONENT("MPMD" ENABLE_MPMD ON "ENABLE_LIBUHD" OFF OFF) +LIBUHD_REGISTER_COMPONENT("SIM" ENABLE_SIM ON "ENABLE_LIBUHD;ENABLE_MPMD;ENABLE_PYTHON_API" OFF OFF) LIBUHD_REGISTER_COMPONENT("N300" ENABLE_N300 ON "ENABLE_LIBUHD;ENABLE_MPMD" OFF OFF) LIBUHD_REGISTER_COMPONENT("N320" ENABLE_N320 ON "ENABLE_LIBUHD;ENABLE_MPMD" OFF OFF) LIBUHD_REGISTER_COMPONENT("E320" ENABLE_E320 ON "ENABLE_LIBUHD;ENABLE_MPMD" OFF OFF) @@ -187,6 +188,26 @@ if(DEFINED LIBUHD_OUTPUT_NAME) set_target_properties(uhd PROPERTIES OUTPUT_NAME ${LIBUHD_OUTPUT_NAME}) endif(DEFINED LIBUHD_OUTPUT_NAME) +if(ENABLE_SIM) + # Get python include dirs + include_directories(${PYTHON_INCLUDE_DIRS}) + set(PYBIND11_INCLUDE_DIR + "${CMAKE_SOURCE_DIR}/lib/deps/pybind11/include" + CACHE + STRING + "Location of PyBind11 includes" + ) + include_directories(${PYBIND11_INCLUDE_DIR}) + + # For PYUHD we don't link against the python libraries, but when calling + # python instead of being called by it, we have to. + target_link_libraries(uhd ${PYTHON_LIBRARIES}) + + if(APPLE) + target_link_options(pyuhd PRIVATE "LINKER:-undefined,dynamic_lookup") + endif(APPLE) +endif(ENABLE_SIM) + if(NOT UHDHOST_PKG) #Syntax makes it unusable by UHD_INSTALL install(TARGETS uhd LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT libraries # .so file |