Skip to content
100644 73 lines (53 sloc) 3.02 KB
1e1b9ae @lgritzecho Enhance docs before open source release.
lgritzecho authored
1 Building OSL
2 ------------
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).
8 OSL makes very heavy use of the OpenImageIO project
9 (, 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).
19 Here are the steps to check out, build, and test the OSL distribution:
21 0. Install and build dependencies. You will need Boost (,
22 Imath (, and OpenImageIO
23 (
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.
aa53f13 @schworer Remove reference to SVN from INSTALL
schworer authored
32 1. Check out a copy of the source code from the Git repository:
1e1b9ae @lgritzecho Enhance docs before open source release.
lgritzecho authored
35c7df6 @erichocean Made INSTALL guide have correct git clone instructions.
erichocean authored
34 git clone osl
1e1b9ae @lgritzecho Enhance docs before open source release.
lgritzecho authored
36 2. Change to the distribution directory and 'make'
38 cd osl
39 make
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.
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".
51 Note: The default is to make an optimized "release" build. If
3957b0c @lgritzecho Typo fixes in docs.
lgritzecho authored
52 instead type 'make debug' at the top level, you will end up with
1e1b9ae @lgritzecho Enhance docs before open source release.
lgritzecho authored
53 a debug build (no optimization, full symbols) in "dist/ARCH.debug".
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".
62 5. After building (and setting your library path), you can run the
63 test suite with:
65 make test
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.)
Something went wrong with that request. Please try again.