From af7225589b2d81874a047683ae2e02062b7de007 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 20 Jul 2021 13:29:41 +0000
Subject: Fix installation paths


diff --git a/CMakeLists.txt b/CMakeLists.txt
old mode 100755
new mode 100644
index 9295acb..732caa3
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -264,4 +264,4 @@ endif()
 configure_file(${CMAKE_SOURCE_DIR}/share/ocio/${OCIO_SETUP_NAME}.in
     ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/${OCIO_SETUP_NAME} @ONLY)
 
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/${OCIO_SETUP_NAME} DESTINATION share/ocio/)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/ocio/${OCIO_SETUP_NAME} DESTINATION ${CMAKE_INSTALL_DATADIR}/ocio/)
diff --git a/include/OpenColorIO/CMakeLists.txt b/include/OpenColorIO/CMakeLists.txt
index e4c8a79..b8b4dca 100644
--- a/include/OpenColorIO/CMakeLists.txt
+++ b/include/OpenColorIO/CMakeLists.txt
@@ -16,4 +16,4 @@ file(GLOB_RECURSE core_export_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
 list(APPEND core_export_headers ${CMAKE_CURRENT_BINARY_DIR}/OpenColorABI.h)
 
 install(FILES ${core_export_headers}
-    DESTINATION include/OpenColorIO)
+    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/OpenColorIO)
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
old mode 100755
new mode 100644
index 2ce801e..70e5afa
--- a/src/OpenColorIO/CMakeLists.txt
+++ b/src/OpenColorIO/CMakeLists.txt
@@ -279,7 +279,7 @@ if(MSVC AND BUILD_SHARED_LIBS)
 endif()
 
 install(TARGETS OpenColorIO
-	LIBRARY DESTINATION lib
-	RUNTIME DESTINATION bin
-	ARCHIVE DESTINATION lib
+	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+	RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
 )
-- 
2.30.2


From 2f59da565783253364483d634004104a51818581 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Tue, 20 Jul 2021 13:31:09 +0000
Subject: Fix build for private expat::expat


diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt
index 70e5afa..f360881 100644
--- a/src/OpenColorIO/CMakeLists.txt
+++ b/src/OpenColorIO/CMakeLists.txt
@@ -206,7 +206,7 @@ target_link_libraries(OpenColorIO
 	PUBLIC
 		public_api
 	PRIVATE
-		expat::expat
+		expat
 		Imath::Imath
 		pystring::pystring
 		sampleicc::sampleicc
-- 
2.30.2

