diff options
Diffstat (limited to 'Modules/FindPythonLibs.cmake')
-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() |