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:
authorJens Verwiebe <info@jensverwiebe.de>2012-01-17 00:10:38 +0400
committerJens Verwiebe <info@jensverwiebe.de>2012-01-17 00:10:38 +0400
commit9e62a5250946e2fd43110f585ee57e83c77d1651 (patch)
tree4c6ccdc957553b80af799bfce1dfe280e3c4f211 /CMakeLists.txt
parentf075f2babbb817d7679ce919231e63a4ff2a0893 (diff)
OSX/Cmake: make bpy module work finally by linking against python3.2 framework
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt34
1 files changed, 25 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 003c58f3025..fb6b946b0c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1092,16 +1092,28 @@ elseif(APPLE)
endif()
if(WITH_PYTHON)
- # we use precompiled libraries for py 3.2 and up by default
+ if(NOT WITH_PYTHON_MODULE)
+ # we use precompiled libraries for py 3.2 and up by default
- # normally cached but not since we include them with blender
- set(PYTHON_VERSION 3.2)
- set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")
- # set(PYTHON_BINARY "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
- set(PYTHON_LIBRARY python${PYTHON_VERSION})
- set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
- # set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
+ # normally cached but not since we include them with blender
+ set(PYTHON_VERSION 3.2)
+ set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")
+ # set(PYTHON_BINARY "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
+ set(PYTHON_LIBRARY python${PYTHON_VERSION})
+ set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
+ # set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
+ else()
+ # module must be compiled against Python framework
+ # normally cached but not since we include them with blender
+ set(PYTHON_VERSION 3.2)
+ set(PYTHON_INCLUDE_DIR "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/include/python${PYTHON_VERSION}m")
+ set(PYTHON_BINARY "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/bin/python${PYTHON_VERSION}")
+ #set(PYTHON_LIBRARY python${PYTHON_VERSION})
+ set(PYTHON_LIBPATH "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config-3.2m")
+ #set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
+ endif()
+
# uncached vars
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
@@ -1196,7 +1208,11 @@ elseif(APPLE)
set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
set(WITH_INPUT_NDOF OFF) # unsupported
endif()
-
+
+ if(WITH_PYTHON_MODULE)
+ set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/python")# force cmake to link right framework
+ endif()
+
if(WITH_OPENCOLLADA)
set(OPENCOLLADA ${LIBDIR}/opencollada)