File oiio-patch.patch of Package luxrays
diff -urN luxrender-luxrays-8577ff287efb-patchto02/CMakeLists.txt luxrender-luxrays-8577ff287efb-patchto02-oiio/CMakeLists.txt
--- luxrender-luxrays-8577ff287efb-patchto02/CMakeLists.txt	2022-11-12 14:39:58.322499619 +0900
+++ luxrender-luxrays-8577ff287efb-patchto02-oiio/CMakeLists.txt	2022-11-12 17:48:33.618653969 +0900
@@ -77,10 +77,6 @@
 	MESSAGE(FATAL_ERROR "--> Could not locate required Boost files - Please check ${BOOST_SEARCH_PATH}")
 endif()
 
-if (NOT OPENIMAGEIO_FOUND)
-	MESSAGE(FATAL_ERROR "--> Could not locate required OpenImageIO files - Please check ${OPENIMAGEIO_SEARCH_PATH}")
-endif()
-
 if (NOT OpenCL_FOUND AND NOT LUXRAYS_DISABLE_OPENCL)
 	MESSAGE(ERROR "--> Could not locate required OpenCL files, disabling OpenCL support - Please check ${OPENCL_SEARCH_PATH}")
 	SET(LUXRAYS_DISABLE_OPENCL 1)
diff -urN luxrender-luxrays-8577ff287efb-patchto02/cmake/Dependencies.cmake luxrender-luxrays-8577ff287efb-patchto02-oiio/cmake/Dependencies.cmake
--- luxrender-luxrays-8577ff287efb-patchto02/cmake/Dependencies.cmake	2022-11-12 14:39:58.322499619 +0900
+++ luxrender-luxrays-8577ff287efb-patchto02-oiio/cmake/Dependencies.cmake	2022-11-12 17:46:43.647235360 +0900
@@ -29,7 +29,6 @@
 find_package(Threads REQUIRED)
 
 find_package(OpenImageIO REQUIRED)
-include_directories(SYSTEM ${OPENIMAGEIO_INCLUDE_DIR})
 find_package(OpenEXR REQUIRED)
 
 if(NOT APPLE)
diff -urN luxrender-luxrays-8577ff287efb-patchto02/cmake/Packages/FindOpenImageIO.cmake luxrender-luxrays-8577ff287efb-patchto02-oiio/cmake/Packages/FindOpenImageIO.cmake
--- luxrender-luxrays-8577ff287efb-patchto02/cmake/Packages/FindOpenImageIO.cmake	2015-10-06 17:56:47.000000000 +0900
+++ luxrender-luxrays-8577ff287efb-patchto02-oiio/cmake/Packages/FindOpenImageIO.cmake	1970-01-01 09:00:00.000000000 +0900
@@ -1,72 +0,0 @@
-# - Find OpenImageIO library
-# Find the native OpenImageIO includes and library
-# This module defines
-#  OPENIMAGEIO_INCLUDE_DIRS, where to find openimageio.h, Set when
-#                            OPENIMAGEIO_INCLUDE_DIR is found.
-#  OPENIMAGEIO_LIBRARIES, libraries to link against to use OpenImageIO.
-#  OPENIMAGEIO_ROOT_DIR, The base directory to search for OpenImageIO.
-#                        This can also be an environment variable.
-#  OPENIMAGEIO_FOUND, If false, do not try to use OpenImageIO.
-#
-# also defined, but not for general use are
-#  OPENIMAGEIO_LIBRARY, where to find the OpenImageIO library.
-
-#=============================================================================
-# Copyright 2011 Blender Foundation.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-
-# If OPENIMAGEIO_ROOT_DIR was defined in the environment, use it.
-IF(NOT OPENIMAGEIO_ROOT_DIR AND NOT $ENV{OPENIMAGEIO_ROOT_DIR} STREQUAL "")
-  SET(OPENIMAGEIO_ROOT_DIR $ENV{OPENIMAGEIO_ROOT_DIR})
-ENDIF()
-
-SET(_openimageio_SEARCH_DIRS
-  ${OPENIMAGEIO_ROOT_DIR}
-  /usr/local
-  /sw # Fink
-  /opt/local # DarwinPorts
-  /opt/csw # Blastwave
-  /opt/lib/oiio
-)
-
-FIND_PATH(OPENIMAGEIO_INCLUDE_DIR
-  NAMES
-    OpenImageIO/imageio.h
-  HINTS
-    ${_openimageio_SEARCH_DIRS}
-  PATH_SUFFIXES
-    include
-)
-
-FIND_LIBRARY(OPENIMAGEIO_LIBRARY
-  NAMES
-    OpenImageIO
-  HINTS
-    ${_openimageio_SEARCH_DIRS}
-  PATH_SUFFIXES
-    lib64 lib
-  )
-
-# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if 
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
-    OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR)
-
-IF(OPENIMAGEIO_FOUND)
-  SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
-  SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
-ENDIF(OPENIMAGEIO_FOUND)
-
-MARK_AS_ADVANCED(
-  OPENIMAGEIO_INCLUDE_DIR
-  OPENIMAGEIO_LIBRARY
-)
-
diff -urN luxrender-luxrays-8577ff287efb-patchto02/samples/luxcoredemo/CMakeLists.txt luxrender-luxrays-8577ff287efb-patchto02-oiio/samples/luxcoredemo/CMakeLists.txt
--- luxrender-luxrays-8577ff287efb-patchto02/samples/luxcoredemo/CMakeLists.txt	2015-10-06 17:56:47.000000000 +0900
+++ luxrender-luxrays-8577ff287efb-patchto02-oiio/samples/luxcoredemo/CMakeLists.txt	2022-11-12 17:53:31.625190822 +0900
@@ -29,4 +29,4 @@
 add_executable(luxcoredemo ${LUXCORELIBDEMO_SRCS})
 add_definitions(${VISIBILITY_FLAGS})
 
-TARGET_LINK_LIBRARIES(luxcoredemo luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxcoredemo luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} OpenImageIO::OpenImageIO)
diff -urN luxrender-luxrays-8577ff287efb-patchto02/samples/luxcoreimplserializationdemo/CMakeLists.txt luxrender-luxrays-8577ff287efb-patchto02-oiio/samples/luxcoreimplserializationdemo/CMakeLists.txt
--- luxrender-luxrays-8577ff287efb-patchto02/samples/luxcoreimplserializationdemo/CMakeLists.txt	2015-10-06 17:56:47.000000000 +0900
+++ luxrender-luxrays-8577ff287efb-patchto02-oiio/samples/luxcoreimplserializationdemo/CMakeLists.txt	2022-11-12 17:53:43.348312609 +0900
@@ -28,4 +28,4 @@
 
 add_executable(luxcoreimplserializationdemo ${LUXCOREIMPL_SERIALIZATIONDEMO_SRCS})
 
-TARGET_LINK_LIBRARIES(luxcoreimplserializationdemo luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxcoreimplserializationdemo luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} OpenImageIO::OpenImageIO)
diff -urN luxrender-luxrays-8577ff287efb-patchto02/samples/luxcorescenedemo/CMakeLists.txt luxrender-luxrays-8577ff287efb-patchto02-oiio/samples/luxcorescenedemo/CMakeLists.txt
--- luxrender-luxrays-8577ff287efb-patchto02/samples/luxcorescenedemo/CMakeLists.txt	2015-10-06 17:56:47.000000000 +0900
+++ luxrender-luxrays-8577ff287efb-patchto02-oiio/samples/luxcorescenedemo/CMakeLists.txt	2022-11-12 17:53:50.111523937 +0900
@@ -29,4 +29,4 @@
 add_executable(luxcorescenedemo ${LUXCORESCENEDEMO_SRCS})
 add_definitions(${VISIBILITY_FLAGS})
 
-TARGET_LINK_LIBRARIES(luxcorescenedemo luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxcorescenedemo luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} OpenImageIO::OpenImageIO)
diff -urN luxrender-luxrays-8577ff287efb-patchto02/samples/smallluxgpu4/CMakeLists.txt luxrender-luxrays-8577ff287efb-patchto02-oiio/samples/smallluxgpu4/CMakeLists.txt
--- luxrender-luxrays-8577ff287efb-patchto02/samples/smallluxgpu4/CMakeLists.txt	2022-11-12 14:38:28.810721595 +0900
+++ luxrender-luxrays-8577ff287efb-patchto02-oiio/samples/smallluxgpu4/CMakeLists.txt	2022-11-12 17:54:15.537732162 +0900
@@ -30,9 +30,9 @@
 add_executable(slg4 ${SMALLLUXGPU_SRCS})
 
 if(APPLE)
-	TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${OPENGL_LIBRARIES} ${OpenCL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+	TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${OPENGL_LIBRARIES} ${OpenCL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} OpenImageIO::OpenImageIO)
 else(APPLE)
-	TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${OPENGL_LIBRARIES} ${OpenCL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES})
+	TARGET_LINK_LIBRARIES(slg4 luxcore smallluxgpu luxrays ${EMBREE_LIBRARY} ${OPENGL_LIBRARIES} ${OpenCL_LIBRARIES} ${GLEW_LIBRARY} ${GLUT_LIBRARY} ${TIFF_LIBRARIES} ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} OpenImageIO::OpenImageIO)
 endif(APPLE)
 
 # This instructs FREEGLUT to emit a pragma for the static version
diff -urN luxrender-luxrays-8577ff287efb-patchto02/src/luxrays/CMakeLists.txt luxrender-luxrays-8577ff287efb-patchto02-oiio/src/luxrays/CMakeLists.txt
--- luxrender-luxrays-8577ff287efb-patchto02/src/luxrays/CMakeLists.txt	2022-11-12 14:38:28.804055043 +0900
+++ luxrender-luxrays-8577ff287efb-patchto02-oiio/src/luxrays/CMakeLists.txt	2022-11-12 17:55:34.339646993 +0900
@@ -234,7 +234,7 @@
 ENDIF(GCC AND NOT APPLE)
 
 TARGET_LINK_LIBRARIES(luxrays ${Boost_LIBRARIES})
-TARGET_LINK_LIBRARIES(luxrays ${OPENIMAGEIO_LIBRARIES})
+TARGET_LINK_LIBRARIES(luxrays OpenImageIO::OpenImageIO)
 
 IF (NOT LUXRAYS_DISABLE_OPENCL)
 	TARGET_LINK_LIBRARIES(luxrays ${OPENGL_gl_LIBRARY})