diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2012-11-16 01:35:25 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2012-11-16 01:35:25 +0400 |
commit | 69320ea5954696ccf80eef33ecfe2dda88f579f0 (patch) | |
tree | 505370a8beab842ae704c881d62e0840290e70b3 | |
parent | 7e97cd4b49b2ec639ab92083c23a73fbbfedeb43 (diff) |
OSX/scons/osl: initial osl compiling, todo: fix shader compile and copy to bundle
-rw-r--r-- | SConstruct | 3 | ||||
-rw-r--r-- | build_files/scons/config/darwin-config.py | 18 | ||||
-rw-r--r-- | intern/cycles/SConscript | 1 | ||||
-rw-r--r-- | intern/cycles/kernel/osl/SConscript | 1 |
4 files changed, 23 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 0bbe06eb21e..01e83a7bacc 100644 --- a/SConstruct +++ b/SConstruct @@ -306,6 +306,9 @@ if env['OURPLATFORM']=='darwin': else: env.Append(LINKFLAGS=['-Xlinker','-weak_framework','-Xlinker','Jackmp']) + if env['WITH_BF_CYCLES_OSL'] == 1: + env.Append(LINKFLAGS=['-force_load','../lib/darwin-9.x.universal/osl/lib/liboslexec.a']) + if env['WITH_BF_OPENMP'] == 1: if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): env['CCFLAGS'].append('/openmp') diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py index 79027ee13b8..73cd92ccb4c 100644 --- a/build_files/scons/config/darwin-config.py +++ b/build_files/scons/config/darwin-config.py @@ -276,6 +276,24 @@ BF_PCRE_LIBPATH = '${BF_PCRE}/lib' # Cycles WITH_BF_CYCLES = True +#OSL + +WITH_BF_CYCLES_OSL = True +BF_OSL = LIBDIR + '/osl' +BF_OSL_INC = '${BF_OSL}/include' +# note oslexec would passed via program linkflags, which is needed to +# make llvm happy with osl_allocate_closure_component +BF_OSL_LIB = 'oslcomp oslquery' +BF_OSL_LIBPATH = '${BF_OSL}/lib' +BF_OSL_COMPILER = '${BF_OSL}/bin/oslc' + +WITH_BF_LLVM = True +BF_LLVM = LIBDIR + '/llvm' +BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \ + 'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \ + 'LLVMTarget LLVMMC LLVMCore LLVMSupport' +BF_LLVM_LIBPATH = '${BF_LLVM}/lib' + WITH_BF_OIIO = True BF_OIIO = LIBDIR + '/openimageio' BF_OIIO_INC = '${BF_OIIO}/include' diff --git a/intern/cycles/SConscript b/intern/cycles/SConscript index 9a4df809732..1a127e364fe 100644 --- a/intern/cycles/SConscript +++ b/intern/cycles/SConscript @@ -36,6 +36,7 @@ incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.sp incs.extend('#extern/glew/include #intern/mikktspace'.split()) incs.append(cycles['BF_OIIO_INC']) incs.append(cycles['BF_BOOST_INC']) +incs.append(cycles['BF_OPENEXR_INC'].split()) incs.extend(cycles['BF_PYTHON_INC'].split()) if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): diff --git a/intern/cycles/kernel/osl/SConscript b/intern/cycles/kernel/osl/SConscript index a66d2447720..2060422ba13 100644 --- a/intern/cycles/kernel/osl/SConscript +++ b/intern/cycles/kernel/osl/SConscript @@ -10,6 +10,7 @@ incs = '. .. ../svm ../../render ../../util ../../device' incs += ' ' + env['BF_OIIO_INC'] incs += ' ' + env['BF_BOOST_INC'] incs += ' ' + env['BF_OSL_INC'] +incs += ' ' + env['BF_OPENEXR_INC'] defs.append('CCL_NAMESPACE_BEGIN=namespace ccl {') defs.append('CCL_NAMESPACE_END=}') |