aboutsummaryrefslogtreecommitdiffstats
path: root/host/python/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'host/python/CMakeLists.txt')
-rw-r--r--host/python/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt
index 07791de55..ec2c80fd4 100644
--- a/host/python/CMakeLists.txt
+++ b/host/python/CMakeLists.txt
@@ -16,6 +16,14 @@ PYTHON_CHECK_MODULE(
# Get include dirs
include_directories(${PYTHON_INCLUDE_DIRS})
+set(PYBIND11_INCLUDE_DIR
+ "${CMAKE_SOURCE_DIR}/lib/deps/pybind11/include"
+ CACHE
+ STRING
+ "Location of PyBind11 includes"
+)
+message(STATUS "${PYBIND11_INCLUDE_DIR}")
+include_directories(${PYBIND11_INCLUDE_DIR})
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c
"from __future__ import print_function\ntry:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\nexcept:\n pass"
@@ -26,9 +34,10 @@ add_library(pyuhd SHARED pyuhd.cpp)
target_include_directories(pyuhd PUBLIC
${PYTHON_NUMPY_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/lib
+ ${PYBIND11_INCLUDE_DIR}
)
-target_link_libraries(pyuhd ${BOOST_PYTHON_LIBRARY} ${Boost_LIBRARIES} ${PYTHON_LIBRARY} uhd)
+target_link_libraries(pyuhd ${Boost_LIBRARIES} ${PYTHON_LIBRARY} uhd)
# Copy pyuhd library to the staging directory
if(WIN32)
set(PYUHD_LIBRARY_NAME libpyuhd.pyd)