diff options
author | Brad King <brad.king@kitware.com> | 2016-11-30 13:37:34 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-11-30 13:37:34 (GMT) |
commit | a53a2f1e7e786a74c51796fcc6b94937f21ab45d (patch) | |
tree | 1a8b809961cc91de94b038527776958748da9cc3 | |
parent | 2036639b55fe5a1baaa36145368e7229834d6387 (diff) | |
parent | 9db0dfd75861aeb40433ad8a566c2a5900976659 (diff) | |
download | CMake-a53a2f1e7e786a74c51796fcc6b94937f21ab45d.zip CMake-a53a2f1e7e786a74c51796fcc6b94937f21ab45d.tar.gz CMake-a53a2f1e7e786a74c51796fcc6b94937f21ab45d.tar.bz2 |
Merge topic 'FindPythonLibs-tolerate-relative-exe'
9db0dfd7 FindPythonLibs: Tolerate a non-absolute PYTHON_EXECUTABLE
-rw-r--r-- | Modules/FindPythonLibs.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index 1ebbf29..cd623cf 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -42,16 +42,16 @@ # Use the executable's path as a hint set(_Python_LIBRARY_PATH_HINT) -if(PYTHON_EXECUTABLE) +if(IS_ABSOLUTE "${PYTHON_EXECUTABLE}") if(WIN32) - get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH) + get_filename_component(_Python_PREFIX "${PYTHON_EXECUTABLE}" PATH) if(_Python_PREFIX) set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/libs) endif() unset(_Python_PREFIX) else() - get_filename_component(_Python_PREFIX ${PYTHON_EXECUTABLE} PATH) - get_filename_component(_Python_PREFIX ${_Python_PREFIX} PATH) + get_filename_component(_Python_PREFIX "${PYTHON_EXECUTABLE}" PATH) + get_filename_component(_Python_PREFIX "${_Python_PREFIX}" PATH) if(_Python_PREFIX) set(_Python_LIBRARY_PATH_HINT ${_Python_PREFIX}/lib) endif() |