927d71
diff -up OpenImageIO-oiio-1c4030e/Makefile.backport OpenImageIO-oiio-1c4030e/Makefile
927d71
--- OpenImageIO-oiio-1c4030e/Makefile.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/Makefile	2011-08-27 09:26:48.255906794 -0400
927d71
@@ -27,7 +27,7 @@ ifdef PROFILE
927d71
 endif
927d71
 
927d71
 MY_MAKE_FLAGS ?=
927d71
-MY_CMAKE_FLAGS ?=
927d71
+MY_CMAKE_FLAGS ?= -DSELF_CONTAINED_INSTALL_TREE:BOOL=TRUE
927d71
 
927d71
 # Site-specific build instructions
927d71
 ifndef OPENIMAGEIO_SITE
927d71
diff -up OpenImageIO-oiio-1c4030e/src/cmake/externalpackages.cmake.backport OpenImageIO-oiio-1c4030e/src/cmake/externalpackages.cmake
927d71
--- OpenImageIO-oiio-1c4030e/src/cmake/externalpackages.cmake.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/cmake/externalpackages.cmake	2011-08-27 09:26:48.255906794 -0400
927d71
@@ -237,3 +237,15 @@ endif ()
927d71
 # end Field3d setup
927d71
 ###########################################################################
927d71
 
927d71
+###########################################################################
927d71
+# Pugixml setup.  Normally we just use the version bundled with oiio, but
927d71
+# some linux distros are quite particular about having separate packages so we
927d71
+# allow this to be overridden to use the distro-provided package if desired.
927d71
+if (USE_EXTERNAL_PUGIXML)
927d71
+    find_package (PugiXML REQUIRED)
927d71
+    # insert include path to pugixml first, to ensure that the external
927d71
+    # pugixml is found, and not the one in OIIO's include directory.
927d71
+    include_directories (BEFORE ${PUGIXML_INCLUDE_DIR})
927d71
+endif()
927d71
+
927d71
+###########################################################################
927d71
diff -up OpenImageIO-oiio-1c4030e/src/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/CMakeLists.txt
927d71
--- OpenImageIO-oiio-1c4030e/src/CMakeLists.txt.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/CMakeLists.txt	2011-08-27 09:26:48.256906780 -0400
927d71
@@ -29,13 +29,11 @@ set (USE_FIELD3D ON CACHE BOOL "Use Fiel
927d71
 set (USE_JASPER ON CACHE BOOL "Use Jasper for JPEG-2000 if found")
927d71
 set (NOTHREADS OFF CACHE BOOL "Compile with no threads or locking")
927d71
 set (PYTHON_VERSION 2.6)
927d71
+set (USE_EXTERNAL_PUGIXML OFF CACHE BOOL
927d71
+     "Use an externally built shared library version of the pugixml library")
927d71
 
927d71
-if (NOT SOVERSION)
927d71
-    set (SOVERSION ${OIIO_VERSION_MAJOR} CACHE STRING "Set the SO version in the SO name of the output library")
927d71
-endif ()
927d71
-if (NOT ${SOVERSION} STREQUAL ${OIIO_VERSION_MAJOR})
927d71
-    set (OIIO_VERSION_MAJOR ${SOVERSION})
927d71
-endif ()
927d71
+set (SOVERSION ${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}
927d71
+     CACHE STRING "Set the SO version in the SO name of the output library")
927d71
 
927d71
 if (NOTHREADS)
927d71
     message (STATUS "NO THREADS!")
927d71
@@ -89,19 +87,61 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
927d71
     add_definitions ("-DDEBUG=1")
927d71
 endif ()
927d71
 
927d71
-# Exec Install Locations
927d71
-set (BINDIR   "${CMAKE_INSTALL_PREFIX}/bin")
927d71
-set (LIBDIR   "${CMAKE_INSTALL_PREFIX}/lib")
927d71
-set (PYLIBDIR "${CMAKE_INSTALL_PREFIX}/python")
927d71
-if (EXEC_INSTALL_PREFIX)
927d71
-    set (BINDIR   "${EXEC_INSTALL_PREFIX}/bin")
927d71
-    set (LIBDIR   "${EXEC_INSTALL_PREFIX}/lib")
927d71
-    set (PYLIBDIR "${EXEC_INSTALL_PREFIX}/python")
927d71
+###########################################################################
927d71
+# Paths for install tree customization.  Note that relative paths are relative
927d71
+# to CMAKE_INSTALL_PREFIX.
927d71
+set (DEFAULT_BIN_INSTALL_DIR   "bin")
927d71
+set (DEFAULT_LIB_INSTALL_DIR   "lib")
927d71
+set (DEFAULT_INCLUDE_INSTALL_DIR "include/OpenImageIO")
927d71
+if (UNIX AND NOT SELF_CONTAINED_INSTALL_TREE)
927d71
+    # Try to be well-behaved and install into reasonable places according to
927d71
+    # the "standard" unix directory heirarchy
927d71
+    # TODO: Figure out how to get the correct python directory
927d71
+    set (DEFAULT_PYLIB_INSTALL_DIR "lib/python/site-packages")
927d71
+    set (DEFAULT_DOC_INSTALL_DIR "share/doc/openimageio")
927d71
+    set (DEFAULT_MAN_INSTALL_DIR "share/man/man1")
927d71
+else ()
927d71
+    # Here is the "self-contained install tree" case: the expectation here is
927d71
+    # that everything OIIO related will go into its own directory, not into
927d71
+    # some standard system heirarchy.
927d71
+    set (DEFAULT_PYLIB_INSTALL_DIR "python")
927d71
+    set (DEFAULT_DOC_INSTALL_DIR "doc")
927d71
+    set (DEFAULT_MAN_INSTALL_DIR "doc/man")
927d71
 endif ()
927d71
+if (EXEC_INSTALL_PREFIX)
927d71
+    # Tack on an extra prefix to support multi-arch builds.
927d71
+    set (DEFAULT_BIN_INSTALL_DIR   "${EXEC_INSTALL_PREFIX}/${DEFAULT_BIN_INSTALL_DIR}")
927d71
+    set (DEFAULT_LIB_INSTALL_DIR   "${EXEC_INSTALL_PREFIX}/${DEFAULT_LIB_INSTALL_DIR}")
927d71
+    set (DEFAULT_PYLIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${DEFAULT_PYLIB_INSTALL_DIR}")
927d71
+endif ()
927d71
+# Set up cmake cache variables corresponding to the defaults deduced above, so
927d71
+# that the user can override them as desired:
927d71
+set (BIN_INSTALL_DIR ${DEFAULT_BIN_INSTALL_DIR} CACHE STRING
927d71
+     "Install location for binaries (relative to CMAKE_INSTALL_PREFIX or absolute)")
927d71
+set (LIB_INSTALL_DIR ${DEFAULT_LIB_INSTALL_DIR} CACHE STRING
927d71
+     "Install location for libraries (relative to CMAKE_INSTALL_PREFIX or absolute)")
927d71
+set (PYLIB_INSTALL_DIR ${DEFAULT_PYLIB_INSTALL_DIR} CACHE STRING
927d71
+     "Install location for python libraries (relative to CMAKE_INSTALL_PREFIX or absolute)")
927d71
+set (INCLUDE_INSTALL_DIR ${DEFAULT_INCLUDE_INSTALL_DIR} CACHE STRING
927d71
+     "Install location of header files (relative to CMAKE_INSTALL_PREFIX or absolute)")
927d71
+set (DOC_INSTALL_DIR ${DEFAULT_DOC_INSTALL_DIR} CACHE STRING
927d71
+     "Install location for documentation (relative to CMAKE_INSTALL_PREFIX or absolute)")
927d71
+if (UNIX)
927d71
+    set (MAN_INSTALL_DIR ${DEFAULT_MAN_INSTALL_DIR} CACHE STRING
927d71
+         "Install location for manual pages (relative to CMAKE_INSTALL_PREFIX or absolute)")
927d71
+endif()
927d71
+
927d71
+set (INSTALL_DOCS ON CACHE BOOL "Install documentation")
927d71
+
927d71
 
927d71
-set (CMAKE_INSTALL_RPATH "${LIBDIR}")
927d71
+#####
927d71
+set (CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
927d71
+if (NOT IS_ABSOLUTE ${CMAKE_INSTALL_RPATH})
927d71
+    set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
927d71
+endif ()
927d71
 set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
927d71
 
927d71
+
927d71
 ###########################################################################
927d71
 if (MSVC)
927d71
     add_definitions (-D_CRT_SECURE_NO_DEPRECATE)
927d71
diff -up OpenImageIO-oiio-1c4030e/src/cmake/modules/FindPugiXML.cmake.backport OpenImageIO-oiio-1c4030e/src/cmake/modules/FindPugiXML.cmake
927d71
--- OpenImageIO-oiio-1c4030e/src/cmake/modules/FindPugiXML.cmake.backport	2011-08-27 09:26:48.255906794 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/cmake/modules/FindPugiXML.cmake	2011-08-27 09:26:48.255906794 -0400
927d71
@@ -0,0 +1,21 @@
927d71
+# Find the pugixml XML parsing library.
927d71
+#
927d71
+# Sets the usual variables expected for find_package scripts:
927d71
+#
927d71
+# PUGIXML_INCLUDE_DIR - header location
927d71
+# PUGIXML_LIBRARIES - library to link against
927d71
+# PUGIXML_FOUND - true if pugixml was found.
927d71
+
927d71
+find_path (PUGIXML_INCLUDE_DIR pugixml.hpp)
927d71
+find_library (PUGIXML_LIBRARY NAMES pugixml)
927d71
+
927d71
+# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
927d71
+include (FindPackageHandleStandardArgs)
927d71
+FIND_PACKAGE_HANDLE_STANDARD_ARGS (PugiXML DEFAULT_MSG PUGIXML_LIBRARY
927d71
+                                   PUGIXML_INCLUDE_DIR)
927d71
+
927d71
+if (PUGIXML_FOUND)
927d71
+    set (PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
927d71
+endif()
927d71
+
927d71
+mark_as_advanced (PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
927d71
diff -up OpenImageIO-oiio-1c4030e/src/cmake/oiio_macros.cmake.backport OpenImageIO-oiio-1c4030e/src/cmake/oiio_macros.cmake
927d71
--- OpenImageIO-oiio-1c4030e/src/cmake/oiio_macros.cmake.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/cmake/oiio_macros.cmake	2011-08-27 09:26:48.256906780 -0400
927d71
@@ -7,9 +7,9 @@
927d71
 #
927d71
 macro (oiio_install_targets)
927d71
     install (TARGETS ${ARGN}
927d71
-             RUNTIME DESTINATION "${BINDIR}" COMPONENT user
927d71
-             LIBRARY DESTINATION "${LIBDIR}" COMPONENT user
927d71
-             ARCHIVE DESTINATION "${LIBDIR}" COMPONENT developer)
927d71
+             RUNTIME DESTINATION "${BIN_INSTALL_DIR}" COMPONENT user
927d71
+             LIBRARY DESTINATION "${LIB_INSTALL_DIR}" COMPONENT user
927d71
+             ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT developer)
927d71
 endmacro ()
927d71
 
927d71
 # Macro to add a build target for an IO plugin.
927d71
diff -up OpenImageIO-oiio-1c4030e/src/doc/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/doc/CMakeLists.txt
927d71
--- OpenImageIO-oiio-1c4030e/src/doc/CMakeLists.txt.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/doc/CMakeLists.txt	2011-08-27 09:28:40.225349570 -0400
927d71
@@ -1,11 +1,38 @@
927d71
-set (public_docs openimageio.pdf CLA-INDIVIDUAL CLA-CORPORATE)
927d71
+project(documentation)
927d71
 
927d71
-install (FILES ${public_docs} DESTINATION doc COMPONENT documentation)
927d71
+set (public_docs
927d71
+     openimageio.pdf
927d71
+     ${OpenImageIO_SOURCE_DIR}/../LICENSE
927d71
+     ${OpenImageIO_SOURCE_DIR}/../CHANGES
927d71
+)
927d71
 
927d71
-install (FILES ${PROJECT_SOURCE_DIR}/../LICENSE
927d71
-               ${PROJECT_SOURCE_DIR}/../INSTALL
927d71
-               ${PROJECT_SOURCE_DIR}/../CHANGES
927d71
-         DESTINATION .)
927d71
+if (INSTALL_DOCS)
927d71
+     install (FILES ${public_docs} DESTINATION doc COMPONENT documentation)
927d71
+endif ()
927d71
 
927d71
-#install (DIRECTORY doxygen/html DESTINATION doc
927d71
-#         PATTERN .svn EXCLUDE)
927d71
+# generate man pages using txt2man and a tiny python script to munge the
927d71
+# result of "$tool --help"
927d71
+find_program(TXT2MAN txt2man)
927d71
+find_package(PythonInterp)
927d71
+if (UNIX AND TXT2MAN AND PYTHONINTERP_FOUND)
927d71
+    message (STATUS "Unix man page documentation will be generated")
927d71
+    set (cli_tools iinfo maketx idiff iv igrep iprocess iconvert)
927d71
+
927d71
+    foreach (tool ${cli_tools})
927d71
+        set (outfile "${documentation_BINARY_DIR}/${tool}.1")
927d71
+        list (APPEND manpage_files ${outfile})
927d71
+        add_custom_command (OUTPUT ${outfile}
927d71
+            COMMAND ${tool} --help |
927d71
+            ${PYTHON_EXECUTABLE} ${documentation_SOURCE_DIR}/help2man_preformat.py |
927d71
+            ${TXT2MAN} -v OpenImageIO -s 1 -t ${tool} > ${outfile}
927d71
+            DEPENDS ${tool} help2man_preformat.py)
927d71
+    endforeach()
927d71
+
927d71
+    # force man page build before install
927d71
+    add_custom_target (man_pages ALL DEPENDS ${manpage_files})
927d71
+
927d71
+    if (INSTALL_DOCS)
927d71
+        install (FILES ${manpage_files}
927d71
+                 DESTINATION ${MAN_INSTALL_DIR} COMPONENT documentation)
927d71
+    endif ()
927d71
+endif()
927d71
diff -up OpenImageIO-oiio-1c4030e/src/doc/help2man_preformat.py.backport OpenImageIO-oiio-1c4030e/src/doc/help2man_preformat.py
927d71
--- OpenImageIO-oiio-1c4030e/src/doc/help2man_preformat.py.backport	2011-08-27 09:26:48.257906766 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/doc/help2man_preformat.py	2011-08-27 09:26:48.257906766 -0400
927d71
@@ -0,0 +1,35 @@
927d71
+#!/usr/bin/python
927d71
+
927d71
+from __future__ import print_function
927d71
+import sys
927d71
+
927d71
+lines = [l.rstrip().replace('\t', ' '*8) for l in sys.stdin.readlines()]
927d71
+
927d71
+print('TITLE')
927d71
+print(lines[0])
927d71
+print()
927d71
+
927d71
+print('SYNOPSIS')
927d71
+for i,line in enumerate(lines[2:]):
927d71
+    if line.lstrip().startswith('-'):
927d71
+        optStart = i+2
927d71
+        break
927d71
+    print(line)
927d71
+
927d71
+print('''DESCRIPTION
927d71
+This program is part of the OpenImageIO (http://www.openimageio.org) tool suite.
927d71
+Detailed documentation is avaliable in pdf format with the OpenImageIO
927d71
+distribution.
927d71
+''')
927d71
+
927d71
+print('OPTIONS')
927d71
+for line in lines[optStart:]:
927d71
+    if not line.startswith(' '):
927d71
+        print()
927d71
+        print(line)
927d71
+    elif not line.lstrip().startswith('-'):
927d71
+        print(line.lstrip())
927d71
+    else:
927d71
+        print(line)
927d71
+print()
927d71
+
927d71
diff -up OpenImageIO-oiio-1c4030e/src/include/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/include/CMakeLists.txt
927d71
--- OpenImageIO-oiio-1c4030e/src/include/CMakeLists.txt.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/include/CMakeLists.txt	2011-08-27 09:26:48.257906766 -0400
927d71
@@ -4,22 +4,26 @@ set (public_headers argparse.h dassert.h
927d71
                     imagecache.h imageio.h osdep.h paramlist.h
927d71
                     refcnt.h strutil.h sysutil.h texture.h thread.h timer.h
927d71
                     typedesc.h ustring.h varyingref.h
927d71
-                    colortransfer.h pugixml.hpp pugiconfig.hpp
927d71
+                    colortransfer.h
927d71
     )
927d71
 
927d71
+if (NOT USE_EXTERNAL_PUGIXML)
927d71
+    list (APPEND public_headers pugixml.hpp pugiconfig.hpp)
927d71
+endif ()
927d71
+
927d71
 message(STATUS "Create version.h from version.h.in")
927d71
+# Mangle the SOVERSION so that it's a valid C++ identifier for the versioning
927d71
+# namespace defined in version.h
927d71
+string (REGEX REPLACE "\\." "_" MANGLED_SOVERSION ${SOVERSION})
927d71
+set (OIIO_VERSION_NS "v${MANGLED_SOVERSION}")
927d71
 configure_file(version.h.in ${CMAKE_BINARY_DIR}/include/version.h @ONLY)
927d71
 list(APPEND public_headers ${CMAKE_BINARY_DIR}/include/version.h)
927d71
 
927d71
-install (FILES ${public_headers} DESTINATION include/OpenImageIO
927d71
+install (FILES ${public_headers} DESTINATION ${INCLUDE_INSTALL_DIR}
927d71
          COMPONENT developer)
927d71
 
927d71
 if (USE_TBB)
927d71
-    file (GLOB tbb_headers tbb/*.h)
927d71
-    file (GLOB tbb_headers2 tbb/machine/*.h)
927d71
-    install (FILES ${tbb_headers} DESTINATION include/OpenImageIO/tbb
927d71
-             COMPONENT developer)
927d71
-    install (FILES ${tbb_headers2} DESTINATION include/OpenImageIO/tbb/machine
927d71
+    install (DIRECTORY tbb DESTINATION ${INCLUDE_INSTALL_DIR}
927d71
              COMPONENT developer)
927d71
 endif ()
927d71
 
927d71
diff -up OpenImageIO-oiio-1c4030e/src/include/version.h.in.backport OpenImageIO-oiio-1c4030e/src/include/version.h.in
927d71
--- OpenImageIO-oiio-1c4030e/src/include/version.h.in.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/include/version.h.in	2011-08-27 09:26:48.257906766 -0400
927d71
@@ -39,7 +39,7 @@
927d71
 #define OIIO_VERSION_MAJOR @OIIO_VERSION_MAJOR@
927d71
 #define OIIO_VERSION_MINOR @OIIO_VERSION_MINOR@
927d71
 #define OIIO_VERSION_PATCH @OIIO_VERSION_PATCH@
927d71
-#define OIIO_VERSION_NS v@SOVERSION@
927d71
+#define OIIO_VERSION_NS @OIIO_VERSION_NS@
927d71
 
927d71
 #define OIIO_VERSION (10000 * OIIO_VERSION_MAJOR + \
927d71
                         100 * OIIO_VERSION_MINOR + \
927d71
diff -up OpenImageIO-oiio-1c4030e/src/libOpenImageIO/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/libOpenImageIO/CMakeLists.txt
927d71
--- OpenImageIO-oiio-1c4030e/src/libOpenImageIO/CMakeLists.txt.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/libOpenImageIO/CMakeLists.txt	2011-08-27 09:26:48.257906766 -0400
927d71
@@ -12,8 +12,6 @@ set (libOpenImageIO_hdrs ../include/argp
927d71
                          ../include/osdep.h
927d71
                          ../include/paramlist.h
927d71
                          ../include/plugin.h
927d71
-                         ../include/pugiconfig.hpp
927d71
-                         ../include/pugixml.hpp
927d71
                          ../include/SHA1.h
927d71
                          ../include/strutil.h
927d71
                          ../include/sysutil.h
927d71
@@ -25,6 +23,13 @@ set (libOpenImageIO_hdrs ../include/argp
927d71
                          ../include/varyingref.h    
927d71
                          )
927d71
 
927d71
+if (NOT USE_EXTERNAL_PUGIXML)
927d71
+    list (APPEND libOpenImageIO_hdrs
927d71
+          ../include/pugiconfig.hpp
927d71
+          ../include/pugixml.hpp
927d71
+    )
927d71
+endif()
927d71
+
927d71
 set (libOpenImageIO_srcs formatspec.cpp imagebuf.cpp
927d71
                          imagebufalgo.cpp imagebufalgo_orient.cpp
927d71
                           imageinput.cpp imageio.cpp imageioplugin.cpp
927d71
@@ -37,7 +42,6 @@ set (libOpenImageIO_srcs formatspec.cpp 
927d71
                           ../libutil/paramlist.cpp 
927d71
                           ../libutil/plugin.cpp 
927d71
                           ../libutil/pystring.cpp
927d71
-                          ../libutil/pugixml.cpp
927d71
                           ../libutil/SHA1.cpp 
927d71
                           ../libutil/strutil.cpp 
927d71
                           ../libutil/sysutil.cpp 
927d71
@@ -51,6 +55,10 @@ set (libOpenImageIO_srcs formatspec.cpp 
927d71
                           ${libOpenImageIO_hdrs}
927d71
                          )
927d71
 
927d71
+if (NOT USE_EXTERNAL_PUGIXML)
927d71
+    list (APPEND libOpenImageIO_srcs ../libutil/pugixml.cpp)
927d71
+endif ()
927d71
+
927d71
 # Include our own TBB if using it
927d71
 if (USE_TBB)
927d71
     add_definitions ("-DUSE_TBB=1")
927d71
@@ -175,14 +183,16 @@ if (EMBEDPLUGINS)
927d71
     link_openexr (OpenImageIO)
927d71
 endif ()
927d71
 
927d71
-if (SOVERSION)
927d71
+if (USE_EXTERNAL_PUGIXML)
927d71
+    target_link_libraries (OpenImageIO ${PUGIXML_LIBRARIES})
927d71
+endif ()
927d71
+
927d71
 message(STATUS "Setting SOVERSION to: ${SOVERSION}")
927d71
 set_target_properties(OpenImageIO
927d71
                          PROPERTIES
927d71
                          VERSION ${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}.${OIIO_VERSION_PATCH}
927d71
                          SOVERSION ${SOVERSION}
927d71
                      )
927d71
-endif ()
927d71
 
927d71
 oiio_install_targets (OpenImageIO)
927d71
 
927d71
diff -up OpenImageIO-oiio-1c4030e/src/python/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/python/CMakeLists.txt
927d71
--- OpenImageIO-oiio-1c4030e/src/python/CMakeLists.txt.backport	2011-08-06 13:56:10.000000000 -0400
927d71
+++ OpenImageIO-oiio-1c4030e/src/python/CMakeLists.txt	2011-08-27 09:26:48.264906668 -0400
927d71
@@ -42,7 +42,7 @@ if ( BOOST_CUSTOM OR Boost_FOUND AND PYT
927d71
     endif()
927d71
 							 
927d71
     install (TARGETS PyOpenImageIO
927d71
-             RUNTIME DESTINATION ${PYLIBDIR} COMPONENT user
927d71
-             LIBRARY DESTINATION ${PYLIBDIR} COMPONENT user)
927d71
+             RUNTIME DESTINATION ${PYLIB_INSTALL_DIR} COMPONENT user
927d71
+             LIBRARY DESTINATION ${PYLIB_INSTALL_DIR} COMPONENT user)
927d71
 
927d71
 endif ()