Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-02-15 12:53:28 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-02-15 12:53:28 +0400
commit3ac1ad5378cbf64f823e53cff393351764e042a8 (patch)
tree1d8057697a384bbea1c0136081872aa5a3586835 /source/creator
parent91058355cc0508ed938aa1cb2d1f35bb1b529cf6 (diff)
CMake: determine if python should be bundled into "lib" or "lib64" folder.
Needed to deal with OS like openSUSE where Python is installed to /usr/lib64 and don't work if it's getting bundled into <blender_version>/python/lib. Thanks to Campbell to making this patch cleaner :)
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 61551f4f8c1..1b4d88a6f2e 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -398,12 +398,21 @@ if(UNIX AND NOT APPLE)
if(WITH_PYTHON)
if(WITH_PYTHON_INSTALL)
+ # on some platforms (like openSUSE) Python is linked
+ # to be used from lib64 folder.
+ # determine this from Python's libraries path
+ if(${PYTHON_LIBPATH} MATCHES "lib64$")
+ set(_target_LIB "lib64")
+ else()
+ set(_target_LIB "lib")
+ endif()
+
# Copy the systems python into the install directory
# Scons copy in tools/Blender.py
# install(CODE "message(\"copying a subset of the systems python...\")")
install(
DIRECTORY ${PYTHON_LIBPATH}/python${PYTHON_VERSION}
- DESTINATION ${TARGETDIR_VER}/python/lib
+ DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}
PATTERN ".svn" EXCLUDE
PATTERN "__pycache__" EXCLUDE # * any cache *
PATTERN "distutils" EXCLUDE # ./distutils
@@ -421,6 +430,7 @@ if(UNIX AND NOT APPLE)
# # doesnt work, todo
# install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
+ unset(_target_LIB)
endif()
endif()
elseif(WIN32)