diff options
Diffstat (limited to 'pywrap/CMakeLists.txt')
-rw-r--r-- | pywrap/CMakeLists.txt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pywrap/CMakeLists.txt b/pywrap/CMakeLists.txt index 988546b..b00fdb0 100644 --- a/pywrap/CMakeLists.txt +++ b/pywrap/CMakeLists.txt @@ -17,15 +17,14 @@ set(CMAKE_SWIG_FLAGS "") swig_add_module(pcipywrap python pcipywrap.i pcipywrap.c) swig_link_libraries(pcipywrap ${PYTHON_LIBRARIES} pcilib) -execute_process ( COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) + +#install pcilib python wrapper into Python site packages folder +execute_process ( COMMAND python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) + install(TARGETS ${SWIG_MODULE_pcipywrap_REAL_NAME} DESTINATION ${PYTHON_SITE_PACKAGES}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pcipywrap.py DESTINATION ${PYTHON_SITE_PACKAGES}) if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/server.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test_pcipywrap.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/templates DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/static DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/html_server.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) endif(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) |