aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/python/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt
index 124e16649..c3099348a 100644
--- a/host/python/CMakeLists.txt
+++ b/host/python/CMakeLists.txt
@@ -27,9 +27,15 @@ TARGET_INCLUDE_DIRECTORIES(pyuhd PUBLIC
${PYTHON_NUMPY_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/lib
)
+
TARGET_LINK_LIBRARIES(pyuhd ${BOOST_PYTHON_LIBRARY} ${Boost_LIBRARIES} ${PYTHON_LIBRARY} uhd)
# Copy pyuhd library to the staging directory
-SET(PYUHD_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}pyuhd${CMAKE_SHARED_LIBRARY_SUFFIX})
+IF(WIN32)
+ SET(PYUHD_LIBRARY_NAME libpyuhd.pyd)
+ELSE()
+ SET(PYUHD_LIBRARY_NAME libpyuhd${CMAKE_SHARED_LIBRARY_SUFFIX})
+ENDIF(WIN32)
+
ADD_CUSTOM_COMMAND(TARGET pyuhd
POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:pyuhd> ${CMAKE_CURRENT_BINARY_DIR}/uhd/${PYUHD_LIBRARY_NAME})