openexr/openexr — pull request #73 by charlesfleche (2013-09-15 14:59:30+00:00)
Title: Cmake build is up-to-date and extended to PyIlmBase

These patches allow to build IlmBase, PyIlmBase and OpenEXR with CMake. They allow to build the openexr code base on more recent Ubuntu distributions : see http://lists.nongnu.org/archive/html/openexr-devel/2013-09/msg00013.html

The CMake build now matches the autotools configuration in term of artifacts naming and library versioning. The CMake build has also been extended to PyIlmBase and allow to run tests and build source tarballs.

To build with CMake :
1. set LD_LIBRARY_PATH, PKG_CONFIG_PATH and PYTHONPATH to the relevant paths under the installation prefix.

``` sh
export PREFIX=/path/to/openexr/install/prefix
export LD_LIBRARY_PATH=$PREFIX/lib
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
export PYTHONPATH=$PREFIX/lib/python2.7/site-packages
```
2. create a build directory outside of the source tree and cd inside
3. run cmake by targeting one of the openexr subdir and specify the installation prefix with -DCMAKE_INSTALL_PREFIX. For IlmBase :
``` sh
cmake /path/to/OpenEXR/IlmBase -DCMAKE_INSTALL_PREFIX=$PREFIX
````
4. You can now run make
``` sh
make help # display the available make targets
make # run make VERBOSE=1 to see the debug output
make install
make test # run the tests, IexTest, ImathTest, etc... IlmImfFuzzTest and IlmImfTest take a __long__ time
make package_source # build a source tarball
```

As few features have not been ported yet :
- openex_viewers
- -namespaceversioning
- -customusernamaspace
- generation of .la files (is it really necessary ? Seems more like a hangover from the autotools)
- link from libName.so to libName-2_0.so, which shouldn't be a problem if the projects linking against OpenEXR use pkgconfig to get the dependency names

These patches have been tested on Ubuntu 13.04 64bits only.