diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-02-28 22:35:47 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-02-28 22:35:47 +0100 |
commit | adc657ebcd01ecc2cc5f110453ef00dffde2d5c0 (patch) | |
tree | e25ed33b2608ccebc7b88c5738d4aa68a7d522b5 /pywrap | |
parent | 631f0929c155087648acdd00ef0e2039737f8803 (diff) | |
download | pcitool-adc657ebcd01ecc2cc5f110453ef00dffde2d5c0.tar.gz pcitool-adc657ebcd01ecc2cc5f110453ef00dffde2d5c0.tar.bz2 pcitool-adc657ebcd01ecc2cc5f110453ef00dffde2d5c0.tar.xz pcitool-adc657ebcd01ecc2cc5f110453ef00dffde2d5c0.zip |
Altenrative way to detect location where python modules should be installed
Diffstat (limited to 'pywrap')
-rw-r--r-- | pywrap/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pywrap/CMakeLists.txt b/pywrap/CMakeLists.txt index 988546b..75a9bed 100644 --- a/pywrap/CMakeLists.txt +++ b/pywrap/CMakeLists.txt @@ -17,9 +17,9 @@ 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(TARGETS ${SWIG_MODULE_pcipywrap_REAL_NAME} DESTINATION ${PYTHON_SITE_PACKAGES}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pcipywrap.py DESTINATION ${PYTHON_SITE_PACKAGES}) + +install(TARGETS ${SWIG_MODULE_pcipywrap_REAL_NAME} DESTINATION ${PYTHON_INSTALL_DIR}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pcipywrap.py DESTINATION ${PYTHON_INSTALL_DIR}) if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/server.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) |