[Bf-blender-cvs] [5ea1565] opensubdiv-modifier: OSX: compile options to make osd work
Jens Verwiebe
noreply at git.blender.org
Tue May 20 21:47:00 CEST 2014
Commit: 5ea156523216625b598b421620533ff8eefbd1ed
Author: Jens Verwiebe
Date: Tue May 20 21:46:36 2014 +0200
https://developer.blender.org/rB5ea156523216625b598b421620533ff8eefbd1ed
OSX: compile options to make osd work
===================================================================
M CMakeLists.txt
M build_files/scons/config/darwin-config.py
M intern/opensubdiv/SConscript
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf75c2d..a0e29e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1651,6 +1651,16 @@ elseif(APPLE)
endif()
endif()
+ if(WITH_OPENSUBDIV)
+ set(OPENSUBDIV ${LIBDIR}/opensubdiv)
+ set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
+ find_library(OSL_LIB_UTIL NAMES osdutil PATHS ${OPENSUBDIV_LIBPATH})
+ find_library(OSL_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
+ find_library(OSL_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
+ set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
+ list(APPEND OPENSUBDIV_LIBRARIES ${OSL_LIB_UTIL} ${OSL_LIB_CPU} ${OSL_LIB_GPU})
+ endif()
+
if(WITH_JACK)
find_library(JACK_FRAMEWORK
NAMES jackmp
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index 951bebb..e454b33 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -207,10 +207,10 @@ WITH_BF_FREESTYLE = True
#OpenMP ( will be checked for compiler support and turned off eventually )
WITH_BF_OPENMP = True
-WITH_BF_OPENSUBDIV = False
+WITH_BF_OPENSUBDIV = True
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
-BF_OPENSUBDIV_LIB = 'osdCPU'
+BF_OPENSUBDIV_LIB = 'osdutil osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
#Ray trace optimization
diff --git a/intern/opensubdiv/SConscript b/intern/opensubdiv/SConscript
index d637b53..9c1ad93 100644
--- a/intern/opensubdiv/SConscript
+++ b/intern/opensubdiv/SConscript
@@ -52,7 +52,10 @@ checkOpenSubdivHeaderDefine("gcdComputeController.h", 'OPENSUBDIV_HAS_GCD')
# Ideally it should be late-linking on runtime in order to make
# portable builds.
if checkOpenSubdivHeaderDefine("clComputeController.h", 'OPENSUBDIV_HAS_OPENCL'):
- env['BF_OPENSUBDIV_LIB'] += ' OpenCL'
+ if env['OURPLATFORM'] == ('darwin'):
+ env['PLATFORM_LINKFLAGS'] = env['PLATFORM_LINKFLAGS']+['-framework','OpenCl'] # link to OpenCl framework
+ else:
+ env['BF_OPENSUBDIV_LIB'] += ' OpenCL'
if checkOpenSubdivHeaderDefine("cudaComputeController.h", 'OPENSUBDIV_HAS_CUDA'):
env['BF_OPENSUBDIV_LIB'] += ' cudart'
More information about the Bf-blender-cvs
mailing list