From 04987da5150d4043d8a424dd897eeae0b7110ee5 Mon Sep 17 00:00:00 2001 From: Trung Tran Date: Fri, 13 Jul 2018 12:52:47 +0000 Subject: cmake: add support to make python api installer on windows --- host/python/CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'host/python/CMakeLists.txt') diff --git a/host/python/CMakeLists.txt b/host/python/CMakeLists.txt index a650529fa..92c4daadc 100644 --- a/host/python/CMakeLists.txt +++ b/host/python/CMakeLists.txt @@ -56,11 +56,7 @@ ADD_CUSTOM_TARGET(pyuhd_library ALL DEPENDS ${TIMESTAMP_FILE} pyuhd) IF(HAVE_PYTHON_VIRTUALENV) INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} -q install --force)") ELSE() - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c - "from distutils import sysconfig; print(sysconfig.get_python_lib(plat_specific=True, prefix=''))" - OUTPUT_VARIABLE UHD_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE - ) + SET(UHD_PYTHON_DIR "lib/site-packages") MESSAGE(STATUS "Utilizing the python install directory: ${CMAKE_INSTALL_PREFIX}/${UHD_PYTHON_DIR}") - INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/uhd DESTINATION ${CMAKE_INSTALL_PREFIX}/${UHD_PYTHON_DIR}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/uhd DESTINATION ${UHD_PYTHON_DIR} COMPONENT pythonapi) ENDIF() - -- cgit v1.2.3