Skip to content
This repository
Newer
Older
100644 69 lines (53 sloc) 3.09 kb
1e1b9aea » Larry Gritz
2010-01-11 Enhance docs before open source release.
1 Building OSL
2 ------------
3
4 OSL currently compiles and runs cleanly on Linux and Mac OS X. We have
5 not yet compiled it for Windows, but we believe we it should be very
6 portable (we have done almost nothing platform-specific).
7
8 OSL makes very heavy use of the OpenImageIO project
9 (http://openimageio.org), both for its texture mapping functionality as
10 well as numerous utility classes. If you are integrating OSL into an
11 existing renderer, you may use your own favorite texturing system rather
12 than OpenImageIO with a little minor surgery. There are only a few
13 places where OIIO (OpenImageIO) texturing calls are made, and they could
14 easily be bypassed. But it is probably not possible to remove OIIO
15 completely as a dependency, since we so heavily rely on a number of
16 other utility classes that it provides (for which there was no point
17 reinventing redundantly for OSL).
18
19 Here are the steps to check out, build, and test the OSL distribution:
20
21 0. Install and build dependencies. You will need Boost (www.boost.org),
22 Imath (http://openexr.com/downloads.html), and OpenImageIO
23 (openimageio.org).
24
25 After building OpenImageIO, if you don't have it installed in a
26 "standard" place (like /usr/include), you should set the environment
27 variable $OPENIMAGEIOHOME to point to the compiled distribution, as
28 well as for $OPENIMAGEIOHOME/lib to be in your LD_LIBRARY_PATH (or
29 DYLD_LIBRARY_PATH on OS X) and then OSL's build scripts will be able
30 to find it.
31
32 1. Check out a copy of the source code from the SVN repository:
33
35c7df65 » erichocean
2011-09-20 Made INSTALL guide have correct git clone instructions.
34 git clone https://github.com/imageworks/OpenShadingLanguage.git osl
1e1b9aea » Larry Gritz
2010-01-11 Enhance docs before open source release.
35
36 2. Change to the distribution directory and 'make'
37
38 cd osl
39 make
40
41 Note: OSL uses 'CMake' for its cross-platform build system. But for
42 simplicity, we have made a "make wrapper" around it, so that by just
43 typing 'make' everything will build. Type 'make help' for other
44 options, and note that 'make nuke' will blow everything away for the
45 freshest possible compile.
46
47 3. After compilation, you'll end up with a full OSL distribution in
48 dist/ARCH, where ARCH is the architecture you are building on, one of
49 "linux", "linux64", "macosx", "windows", or "windows64".
50
51 Note: The default is to make an optimized "release" build. If
3957b0c9 » Larry Gritz
2010-01-21 Typo fixes in docs.
52 instead type 'make debug' at the top level, you will end up with
1e1b9aea » Larry Gritz
2010-01-11 Enhance docs before open source release.
53 a debug build (no optimization, full symbols) in "dist/ARCH.debug".
54
55 4. Add the "dist/ARCH/bin" to your $PATH, and "dist/ARCH/lib" to your
56 $LD_LIBRAY_PATH (or $DYLD_LIBRARY_PATH on OS X), or copy the contents
57 of those files to appropriate directories. Public include files
58 (those needed when building applications that incorporate OSL)
59 can be found in "dist/ARCH/include", and documentation can be found
60 in "dist/ARCH/doc".
61
62 5. After building (and setting your library path), you can run the
63 test suite with:
64
65 make test
66
67 (Note: currently all tests pass on OS X but a few tests fail on Linux
68 strictly for floating point precision reasons, not because anything
69 is really broken. We're working on a fix for this.)
70
71
72
Something went wrong with that request. Please try again.