diff options
author | Tom Rondeau | 2012-11-22 09:59:57 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-11-22 09:59:57 -0500 |
commit | 4d6b277c28b8161ff7db9bade127bab5e03a38ef (patch) | |
tree | e5c24f6e3f68dc11be21b64b3e9e8feef4f09f66 /cmake/Modules/GrPython.cmake | |
parent | 20de05ea85ee09c7462fbddfe680eb1a87996dc7 (diff) | |
download | gnuradio-4d6b277c28b8161ff7db9bade127bab5e03a38ef.tar.gz gnuradio-4d6b277c28b8161ff7db9bade127bab5e03a38ef.tar.bz2 gnuradio-4d6b277c28b8161ff7db9bade127bab5e03a38ef.zip |
cmake: Allow user to set Python installation directory from cmake.
cmake -DGR_PYTHON_DIR=<install path>
Diffstat (limited to 'cmake/Modules/GrPython.cmake')
-rw-r--r-- | cmake/Modules/GrPython.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake index 14f2b29cd..791114e05 100644 --- a/cmake/Modules/GrPython.cmake +++ b/cmake/Modules/GrPython.cmake @@ -96,11 +96,13 @@ endmacro(GR_PYTHON_CHECK_MODULE) ######################################################################## # Sets the python installation directory GR_PYTHON_DIR ######################################################################## +if(NOT DEFINED GR_PYTHON_DIR) execute_process(COMMAND ${PYTHON_EXECUTABLE} -c " from distutils import sysconfig print sysconfig.get_python_lib(plat_specific=True, prefix='') " OUTPUT_VARIABLE GR_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE ) +endif() file(TO_CMAKE_PATH ${GR_PYTHON_DIR} GR_PYTHON_DIR) ######################################################################## |