diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-02-15 11:01:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-02-15 11:05:25 +0300 |
commit | aa8fc57f1e7683e0490fad5dc2fc18bdba2cee5b (patch) | |
tree | 0e0224f28f842549afe85473effbc95c5e0c1579 /source/blender/blenkernel/CMakeLists.txt | |
parent | 3d24e57ce8233a2f25d52b7f567e458dda2c8f98 (diff) |
Fix for Python executable not being found on Linux
Python name could include ABI-flags after the version,
since checking for all combinations of ABI flags can expand into many possibilities,
take the executable name from the build system.
Diffstat (limited to 'source/blender/blenkernel/CMakeLists.txt')
-rw-r--r-- | source/blender/blenkernel/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 7177ddc3e6d..7311f330962 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -412,6 +412,13 @@ if(WITH_PYTHON) if(WITH_PYTHON_SECURITY) add_definitions(-DWITH_PYTHON_SECURITY) endif() + + + if (PYTHON_EXECUTABLE) + get_filename_component(_python_exe_name ${PYTHON_EXECUTABLE} NAME) + add_definitions(-DPYTHON_EXECUTABLE_NAME=${_python_exe_name}) + unset(_python_exe_name) + endif() endif() if(WITH_MOD_FLUID) |