3bbc3b75e6
- Fix linking against TBB which broke at some point.
68 lines
3.1 KiB
Diff
68 lines
3.1 KiB
Diff
diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/libOpenImageIO/CMakeLists.txt OpenImageIO-oiio-5b37f1c/src/libOpenImageIO/CMakeLists.txt
|
|
--- OpenImageIO-oiio-5b37f1c.orig/src/libOpenImageIO/CMakeLists.txt 2012-02-28 12:58:45.306847484 -0600
|
|
+++ OpenImageIO-oiio-5b37f1c/src/libOpenImageIO/CMakeLists.txt 2012-02-28 13:02:27.438365805 -0600
|
|
@@ -61,7 +61,11 @@
|
|
endif ()
|
|
|
|
# Include our own TBB if using it
|
|
-if (USE_TBB)
|
|
+if (USE_TBB AND USE_EXTERNAL_TBB)
|
|
+ message (STATUS "System TBB library will be used.")
|
|
+ set (libOpenImageIO_srcs ${libOpenImageIO_srcs})
|
|
+elseif (USE_TBB AND NOT USE_EXTERNAL_TBB)
|
|
+ message (STATUS "Built-in TBB library will be used.")
|
|
set (libOpenImageIO_srcs ${libOpenImageIO_srcs} ../libutil/tbb_misc.cpp)
|
|
endif ()
|
|
|
|
diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/include/CMakeLists.txt OpenImageIO-oiio-5b37f1c/src/include/CMakeLists.txt
|
|
--- OpenImageIO-oiio-5b37f1c.orig/src/include/CMakeLists.txt 2012-02-25 17:17:12.000000000 -0600
|
|
+++ OpenImageIO-oiio-5b37f1c/src/include/CMakeLists.txt 2012-02-28 13:32:00.961799696 -0600
|
|
@@ -22,7 +22,7 @@
|
|
install (FILES ${public_headers} DESTINATION ${INCLUDE_INSTALL_DIR}
|
|
COMPONENT developer)
|
|
|
|
-if (USE_TBB)
|
|
+if (USE_TBB AND NOT USE_EXTERNAL_TBB)
|
|
install (DIRECTORY tbb DESTINATION ${INCLUDE_INSTALL_DIR}
|
|
COMPONENT developer)
|
|
endif ()
|
|
diff -Naur OpenImageIO-oiio-f0a566a.orig/src/CMakeLists.txt OpenImageIO-oiio-f0a566a/src/CMakeLists.txt
|
|
--- OpenImageIO-oiio-f0a566a.orig/src/CMakeLists.txt 2012-06-12 13:03:37.000000000 -0500
|
|
+++ OpenImageIO-oiio-f0a566a/src/CMakeLists.txt 2012-06-28 15:12:45.831826494 -0500
|
|
@@ -34,6 +34,8 @@
|
|
set (PYTHON_VERSION 2.6)
|
|
set (USE_EXTERNAL_PUGIXML OFF CACHE BOOL
|
|
"Use an externally built shared library version of the pugixml library")
|
|
+set (USE_EXTERNAL_TBB OFF CACHE BOOL
|
|
+ "Use system TBB library instead of bundled.")
|
|
|
|
set (SOVERSION ${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}
|
|
CACHE STRING "Set the SO version in the SO name of the output library")
|
|
diff -Naur OpenImageIO-oiio-f0a566a.orig/src/libOpenImageIO/CMakeLists.txt OpenImageIO-oiio-f0a566a/src/libOpenImageIO/CMakeLists.txt
|
|
--- OpenImageIO-oiio-f0a566a.orig/src/libOpenImageIO/CMakeLists.txt 2012-06-28 15:08:38.114834341 -0500
|
|
+++ OpenImageIO-oiio-f0a566a/src/libOpenImageIO/CMakeLists.txt 2012-06-28 15:19:34.819584416 -0500
|
|
@@ -63,7 +63,9 @@
|
|
# Include our own TBB if using it
|
|
if (USE_TBB AND USE_EXTERNAL_TBB)
|
|
message (STATUS "System TBB library will be used.")
|
|
- set (libOpenImageIO_srcs ${libOpenImageIO_srcs})
|
|
+ find_package (TBB REQUIRED)
|
|
+ include_directories (${TBB_INCLUDE_DIRS})
|
|
+ set (libOpenImageIO_srcs ${libOpenImageIO_srcs})
|
|
elseif (USE_TBB AND NOT USE_EXTERNAL_TBB)
|
|
message (STATUS "Built-in TBB library will be used.")
|
|
set (libOpenImageIO_srcs ${libOpenImageIO_srcs} ../libutil/tbb_misc.cpp)
|
|
@@ -211,7 +213,11 @@
|
|
target_link_libraries (OpenImageIO ${OCIO_LIBRARIES})
|
|
endif ()
|
|
|
|
-
|
|
+# Link against system TBB library if specified
|
|
+if (USE_TBB AND USE_EXTERNAL_TBB)
|
|
+ message (STATUS "Linking TBB: ${TBB_LIBRARIES}")
|
|
+ target_link_libraries (OpenImageIO ${TBB_LIBRARIES})
|
|
+endif ()
|
|
|
|
|
|
if (WIN32)
|