[Bf-cycles] OSL branch and static libraries

Lukas Tönne lukas.toenne at gmail.com
Sat Oct 6 19:20:10 CEST 2012


Hi,

Just a quick note:
We have added a github branch to collect and organize all the little
fixes we made for building OSL:

https://github.com/DingTo/OpenShadingLanguage/tree/blender-fixes

Note that this is based on OSL master, for the officially used 1.2
version these changes have been backported:

https://github.com/DingTo/OpenShadingLanguage/tree/RB-1.2

The changes mostly concern CMake build files. I managed to get nicely
working static (!) OSL libraries with this on linux. OSX should also
be almost working, please let me know if you would like have further
fixes included. Windows i have no idea, but feel free to try ;)

== Further instructions ==

Basically you can follow instructions on this page for building boost
and OIIO (shared OIIO build is not needed for static OSL though):
http://wiki.blender.org/index.php/User:DingTo/OpenShadingLanguage/Compile

= For building OSL itself as static lib: =
1) Make sure the environment variables are registered as usual:

OPENIMAGEIOHOME (path to oiio libraries)
BOOST_ROOT (path to boost libraries)
LLVM_VERSION (example: 3.1)
LLVM_DIRECTORY (path to llvm)

2) Set the following options in OSL cmake:
BUILDSTATIC=ON
LINKSTATIC=ON
BUILD_TESTING=OFF (test files need an update, just disable for now)

Other changes from the wiki page are not required, these have been
incorporated in the branch.

= For building Blender with static OSL: =

1) Set the following CMake options:
CYCLES_OSL=ON
WITH_LLVM=ON

After updating cmake you will currently have to change some options
again (this is a bit stupid, will be fixed):
2) Set these to same values as in OSL:
LLVM_VERSION
LLVM_DIRECTORY

Then run cmake update again and build as usual.

We will update the wiki page as soon as the build procedure has been
cleaned up and everything has been confirmed working. Hopefully the
OSL fixes can then be merged upstream asap and we can switch to a new
OSL release version.

Cheers,
Lukas Tönne


More information about the Bf-cycles mailing list