diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-15 16:47:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-15 18:40:27 +0300 |
commit | 535e83687d3efc6431a47d259c94131029c1edf3 (patch) | |
tree | c2d85ce326bca0c591564c741c3ef2260de470f0 /build_files/cmake | |
parent | 477ee3a9de7995b2b870d5462948cb80c4be5ec2 (diff) |
macOS build: simplify python install for new 10.9 libraries.
We stop using the .zip file and just have all files now in
lib/darwin/python/lib, along with numpy, numpy headers and requests.
This makes it consistent with Linux and simplifies code.
For old libraries the .zip stays, code for that gets removed when we
fully switch to new libraries.
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 6105f2e04de..00c5772e11c 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -93,7 +93,11 @@ if(WITH_PYTHON) # normally cached but not since we include them with blender set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m") set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m") - set(PYTHON_LIBRARY python${PYTHON_VERSION}m) + if(WITH_CXX11) + set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a) + else() + set(PYTHON_LIBRARY python${PYTHON_VERSION}m) + endif() set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}") # set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled else() @@ -113,6 +117,9 @@ if(WITH_PYTHON) set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}") set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}") + # needed for Audaspace, numpy is installed into python site-packages + set(NUMPY_INCLUDE_DIRS "${PYTHON_LIBPATH}/site-packages/numpy/core/include") + if(NOT EXISTS "${PYTHON_EXECUTABLE}") message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}") endif() |