Merge branch 'master' into blender2.8
[blender.git] / build_files / cmake / platform / platform_apple.cmake
index 5336024b75ce31be6cae9811159642682b3abf94..17118e4672a749e8db77a07d53e27b0938c99624 100644 (file)
@@ -95,7 +95,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()
@@ -115,6 +119,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()