forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
161 lines (123 loc) · 6.73 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Installation instructions for OpenImageIO
For the most up-to-date build instructions (and in any case somewhat
more detailed than here), please see our wiki:
http://openimageio.org/wiki/index.php?title=Checking_out_and_building_OpenImageIO
Supported platforms at present include Linux (32 and 64 bit),
Mac OS X, and Windows.
Our build system is based upon 'CMake'. If you don't already have it
installed on your system, you can get it from http://www.cmake.org
After you build OpenImageIO, if you compiled with the EMBEDPLUGINS=0 flag
you will need to set the environment variable OIIO_LIBRARY_PATH to point
to the 'lib' directory where OpenImageIO is installed, or else it will
not be able to find the plugins.
Building OpenImageIO on Linux or OS X
-------------------------------------
On Linux and OS X, you can build from source from the top-level
directory by just typing 'make'. (Yes, we have a 'make' wrapper around
our CMake build, it simplifies things.)
During the make, various temporary files (object files, etc.) will
be put in build/PLATFORM, where 'PLATFORM' will be the name of the
platform you are building for (e.g., linux, linux64, macosx).
The result of the make will be a full binary distribution in
dist/PLATFORM.
Sorry, that's as much as it does right now. This is not ready for
release! Soon we'll tar it up, have installers, etc.
Make targets you should know about:
make Build an optimized distro in dist/PLATFORM,
with temp files created while building in
build/PLATFORM.
make debug Build a debugging (symbols, not stripped) distro,
will end up in dist/PLATFORM.debug
make clean Get rid of all the temporary files in
build/PLATFORM
make realclean Get rid of both build/PLATFORM and dist/PLATFORM
make nuke Get rid of all build/ and dist/, for all
platforms
make profile Build a profilable version on dist/PLATFORM.profile
make doxygen Build the Doxygen docs
make help Print all the make options
Additionally, a few helpful modifiers alter some build-time options:
make VERBOSE=1 ... Show all compilation commands
make EMBEDPLUGINS=0 ... Don't compile the plugins into libOpenImageIO
make USE_OPENGL=0 ... Skip anything that needs OpenGL
make USE_QT=0 ... Skip anything that needs Qt
make MYCC=xx MYCXX=yy ... Use custom compilers
make FORCE_OPENGL_1=1 ... Force iv to use OpenGL's fixed pipeline
make USE_TBB=0 ... Don't use TBB
make USE_PYTHON=1 ... Build the Python binding
make BUILDSTATIC=1 ... Build static library instead of shared
make LINKSTATIC=1 ... Link with static external libraries when possible
make SOVERSION=nn ... Include the specifed major version number in the
shared object metadata
make NAMESPACE=name Wrap everything in another namespace
Building on Windows
-------------------
See the latest Windows build docs on our web site:
http://openimageio.org/wiki/index.php?title=Building_OpenImageIO_on_Windows
1. Check out the trunk or a branch of your choice. The remainder of
these instructions assume that you checked out the trunk to the
D:\OIIO\trunk directory.
2. Download the package with precompiled external libraries from
http://www.openimageio.org/external.zip
Next, unpack it. The directory with downloaded code from the repository
and the directory with unpacked libraries should be siblings. For example,
D:
\OIIO
\trunk // this is my tree
\src // directory with src files for OIIO
\build // directory that is created by cmake
\external // this is extracted external package
\dist
\windows
\glew-1.5.1
\ilmbase-1.0.1
\jpeg-6b
\libpng-1.2.3
\openexr-1.6.1
\tbb-21_20080605oss
\zlib-1.2.3
\tiff-3.8.2
3. Download precompiled Qt4 binaries for Windows from here:
http://qt.windows.binaries.googlepages.com/index.html
Unpack it (it doesn't matter where). After unpacking, add the path to
the Qt bin directory to the PATH variable. For example, if you unpacked
this package to the D:\qt-win directory, you should add D:\qt-win\bin to
your PATH. It's important to add the Qt bin directory to PATH because
the FindQt4 module uses it to search for qmake applications.
4. Also, just to be safe, add QTDIR to the environment variables. It
should point to directory where you unpacked Qt.
5. Download precompiled BOOST 1.38 libraries from
http://www.boostpro.com/download
Install it on your system. Choose two versions: Multithread Debug, DLL
and Multithread, DLL for Your Visual Studio version.
5. Download precompiled BOOST 1.38 libraries from here (unfficial
mirror) or from here (unofficial mirror, registration required). Install
it on Your system. Choose two versions: Multithread Debug, DLL and
Multithread, DLL for Your Visual Studio version.
6. Install cmake. You can download precompiled binaries from here:
http://www.cmake.org/cmake/resources/software.html
After installing, run cmake-gui. Set the field that specifies the source
code location (for example, to D:\OIIO\trunk\src). Then set the field
that specifies where to build binaries to the directory you want to
build project for OIIO (for example, D:\OIIO\trunk\build).
7. Set the THIRD_PARTY_TOOLS_HOME environment variable to the directory
where are stored unpacked external libraries (for example,
D:\OIIO\external\dist\windows). You can add variables by clicking Add
entry button.
8. Hit the Configure button. Cmake should automatically find externals
libraries and prepare the environment for creating the OIIO project. If
the configuration process ends without errors go to next step. If not,
read the instructions from the end of this tutorial.
9. Hit the Generate button. Cmake will build Visual Studio a solution in
the build directory.
10. That's all. You can open the OpenImageIO solution and start developing
OIIO! Potential problems:
It may happen that cmake won't find zlib, png, tiff or jpeg
libraries. If so you have to set CMAKE_PREFIX_PATH to point to the
directory where the missing libraries are stored. For example, if cmake
can't find ZLIB, add to CMAKE_PREFIX_PATH the
D:\OIIO\external\dist\windows\zlib-1.2.3 directory. If it can't find
ZLIB and PNG, add
D:\OIIO\external\dist\windows\zlib-1.2.3;D:\OIIO\external\dist\windows\libpng-1.2.3.
Also, if cmake won't find GLEW set up GLEW_INCLUDES and GLEW_LIBRARIES
in cmake-gui. Don't add them (they are already added), just set them.