fdddaa9
diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/libOpenImageIO/CMakeLists.txt OpenImageIO-oiio-5b37f1c/src/libOpenImageIO/CMakeLists.txt
fdddaa9
--- OpenImageIO-oiio-5b37f1c.orig/src/libOpenImageIO/CMakeLists.txt	2012-02-28 12:58:45.306847484 -0600
fdddaa9
+++ OpenImageIO-oiio-5b37f1c/src/libOpenImageIO/CMakeLists.txt	2012-02-28 13:02:27.438365805 -0600
fdddaa9
@@ -61,7 +61,11 @@
fdddaa9
 endif ()
fdddaa9
 
fdddaa9
 # Include our own TBB if using it
fdddaa9
-if (USE_TBB)
fdddaa9
+if (USE_TBB AND USE_EXTERNAL_TBB)
fdddaa9
+    message (STATUS "System TBB library will be used.")
fdddaa9
+    set (libOpenImageIO_srcs ${libOpenImageIO_srcs})
fdddaa9
+elseif (USE_TBB AND NOT USE_EXTERNAL_TBB)
fdddaa9
+    message (STATUS "Built-in TBB library will be used.")
fdddaa9
     set (libOpenImageIO_srcs ${libOpenImageIO_srcs} ../libutil/tbb_misc.cpp)
fdddaa9
 endif ()
fdddaa9
 
fdddaa9
diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/include/CMakeLists.txt OpenImageIO-oiio-5b37f1c/src/include/CMakeLists.txt
fdddaa9
--- OpenImageIO-oiio-5b37f1c.orig/src/include/CMakeLists.txt	2012-02-25 17:17:12.000000000 -0600
fdddaa9
+++ OpenImageIO-oiio-5b37f1c/src/include/CMakeLists.txt	2012-02-28 13:32:00.961799696 -0600
fdddaa9
@@ -22,7 +22,7 @@
fdddaa9
 install (FILES ${public_headers} DESTINATION ${INCLUDE_INSTALL_DIR}
fdddaa9
          COMPONENT developer)
fdddaa9
 
fdddaa9
-if (USE_TBB)
fdddaa9
+if (USE_TBB AND NOT USE_EXTERNAL_TBB)
fdddaa9
     install (DIRECTORY tbb DESTINATION ${INCLUDE_INSTALL_DIR}
fdddaa9
              COMPONENT developer)
fdddaa9
 endif ()