From 98057752006b5c567ed331c5b14e3b8a281b83b9 Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Thu, 26 Jul 2018 01:23:31 +0000 Subject: uhd: python: CMakeLists.txt change dll to pyd To support python api installer --- host/python/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 $ ${CMAKE_CURRENT_BINARY_DIR}/uhd/${PYUHD_LIBRARY_NAME}) -- cgit v1.2.3