From 0cde0e06628fe4bd0371c862c112b9422e0a8f5a Mon Sep 17 00:00:00 2001 From: Alexander Schwank Date: Thu, 28 Mar 2024 22:16:30 -0700 Subject: [PATCH 1/2] Replaced deprecated Carbon framework with ColorSync and CoreGraphics. Signed-off-by: Alexander Schwank --- src/OpenColorIO/CMakeLists.txt | 3 ++- src/OpenColorIO/SystemMonitor_macos.cpp | 3 ++- src/libutils/oglapphelpers/CMakeLists.txt | 3 ++- tests/cpu/CMakeLists.txt | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt index 0b4f9ee292..14b1f9e626 100755 --- a/src/OpenColorIO/CMakeLists.txt +++ b/src/OpenColorIO/CMakeLists.txt @@ -325,7 +325,8 @@ endif() if(APPLE) target_link_libraries(OpenColorIO PRIVATE - "-framework Carbon" + "-framework ColorSync" + "-framework CoreGraphics" "-framework IOKit" ) endif() diff --git a/src/OpenColorIO/SystemMonitor_macos.cpp b/src/OpenColorIO/SystemMonitor_macos.cpp index bfe6ffc1b4..9957903885 100644 --- a/src/OpenColorIO/SystemMonitor_macos.cpp +++ b/src/OpenColorIO/SystemMonitor_macos.cpp @@ -9,7 +9,8 @@ #endif -#include +#include +#include #include #include "Logging.h" diff --git a/src/libutils/oglapphelpers/CMakeLists.txt b/src/libutils/oglapphelpers/CMakeLists.txt index 39a20ecb3a..261bc4e513 100644 --- a/src/libutils/oglapphelpers/CMakeLists.txt +++ b/src/libutils/oglapphelpers/CMakeLists.txt @@ -102,7 +102,8 @@ endif() if(APPLE) target_link_libraries(oglapphelpers PRIVATE - "-framework Carbon" + "-framework ColorSync" + "-framework CoreGraphics" "-framework IOKit" "-framework Metal" "-framework CoreVideo" diff --git a/tests/cpu/CMakeLists.txt b/tests/cpu/CMakeLists.txt index eb4c323875..f5a6eb9512 100755 --- a/tests/cpu/CMakeLists.txt +++ b/tests/cpu/CMakeLists.txt @@ -49,7 +49,8 @@ function(add_ocio_test NAME SOURCES PRIVATE_INCLUDES) # Frameworks needed to access the ICC monitor profile. target_link_libraries(${TEST_BINARY} PRIVATE - "-framework Carbon" + "-framework ColorSync" + "-framework CoreGraphics" "-framework IOKit" ) endif(APPLE) From b0dc240d84bbcaaacac4e5a63c1afb8ea53a2b57 Mon Sep 17 00:00:00 2001 From: Alexander Schwank Date: Thu, 28 Mar 2024 23:59:23 -0700 Subject: [PATCH 2/2] Added CoreFoundation linkage Signed-off-by: Alexander Schwank --- src/OpenColorIO/CMakeLists.txt | 1 + src/libutils/oglapphelpers/CMakeLists.txt | 1 + tests/cpu/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt index 14b1f9e626..4db41aa096 100755 --- a/src/OpenColorIO/CMakeLists.txt +++ b/src/OpenColorIO/CMakeLists.txt @@ -326,6 +326,7 @@ if(APPLE) target_link_libraries(OpenColorIO PRIVATE "-framework ColorSync" + "-framework CoreFoundation" "-framework CoreGraphics" "-framework IOKit" ) diff --git a/src/libutils/oglapphelpers/CMakeLists.txt b/src/libutils/oglapphelpers/CMakeLists.txt index 261bc4e513..cef50ede1c 100644 --- a/src/libutils/oglapphelpers/CMakeLists.txt +++ b/src/libutils/oglapphelpers/CMakeLists.txt @@ -103,6 +103,7 @@ if(APPLE) target_link_libraries(oglapphelpers PRIVATE "-framework ColorSync" + "-framework CoreFoundation" "-framework CoreGraphics" "-framework IOKit" "-framework Metal" diff --git a/tests/cpu/CMakeLists.txt b/tests/cpu/CMakeLists.txt index f5a6eb9512..91246fcc9e 100755 --- a/tests/cpu/CMakeLists.txt +++ b/tests/cpu/CMakeLists.txt @@ -50,6 +50,7 @@ function(add_ocio_test NAME SOURCES PRIVATE_INCLUDES) target_link_libraries(${TEST_BINARY} PRIVATE "-framework ColorSync" + "-framework CoreFoundation" "-framework CoreGraphics" "-framework IOKit" )