diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-24 09:02:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-24 09:06:12 +0300 |
commit | 4560570f8ac91b7ce349c8c1079caaf1f21848bf (patch) | |
tree | bac5df1c2c240a017da449f0e0750f527836527f /build_files/cmake/Modules | |
parent | 3bb7e14618cb928d43fecf0a8930a1edd85dde3e (diff) |
Fix for building blender as a Python module
Installation didn't work on debian distro's
now install into PYTHON_SITE_PACKAGES (which is detected and can be configured).
Diffstat (limited to 'build_files/cmake/Modules')
-rw-r--r-- | build_files/cmake/Modules/FindPythonLibsUnix.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake index 1fb27e7898c..555ca4cf0a0 100644 --- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake +++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake @@ -14,6 +14,7 @@ # PYTHON_INCLUDE_CONFIG_DIRS # PYTHON_LIBRARIES # PYTHON_LIBPATH, Used for installation +# PYTHON_SITE_PACKAGES, Used for installation (as a Python module) # PYTHON_LINKFLAGS # PYTHON_ROOT_DIR, The base directory to search for Python. # This can also be an environment variable. @@ -187,6 +188,15 @@ IF(PYTHONLIBSUNIX_FOUND) SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_CONFIG_DIR}) SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY}) + FIND_FILE(PYTHON_SITE_PACKAGES + NAMES + # debian specific + dist-packages + site-packages + HINTS + ${PYTHON_LIBPATH}/python${PYTHON_VERSION} + ) + # we need this for installation # XXX No more valid with debian-like py3.4 packages... # GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH) @@ -200,4 +210,5 @@ MARK_AS_ADVANCED( PYTHON_INCLUDE_CONFIG_DIR PYTHON_LIBRARY PYTHON_LIBPATH + PYTHON_SITE_PACKAGES ) |