Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/OpenColorIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ if(OCIO_USE_SIMD AND OCIO_USE_SSE2NEON AND COMPILER_SUPPORTS_SSE_WITH_SSE2NEON)
target_link_libraries(OpenColorIO PRIVATE $<BUILD_INTERFACE:sse2neon>)
endif()

if(APPLE)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(OpenColorIO
PRIVATE
"-framework ColorSync"
Expand Down
6 changes: 5 additions & 1 deletion src/OpenColorIO/SystemMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#include <string>
#include <string.h>

#if defined(__APPLE__)
#include <TargetConditionals.h>
#endif

#include <OpenColorIO/OpenColorIO.h>

#include "Logging.h"
Expand All @@ -26,7 +30,7 @@ void SystemMonitorsImpl::getAllMonitors()

} // namespace OCIO_NAMESPACE

#elif __APPLE__
#elif defined(__APPLE__) && TARGET_OS_OSX

#include "SystemMonitor_macos.cpp"

Expand Down
4 changes: 2 additions & 2 deletions tests/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function(add_ocio_test NAME SOURCES TESTS PRIVATE_INCLUDES)
target_link_libraries(${TEST_BINARY} PRIVATE sse2neon)
endif()

if(APPLE)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# Frameworks needed to access the ICC monitor profile.
target_link_libraries(${TEST_BINARY}
PRIVATE
Expand All @@ -72,7 +72,7 @@ function(add_ocio_test NAME SOURCES TESTS PRIVATE_INCLUDES)
"-framework CoreGraphics"
"-framework IOKit"
)
endif(APPLE)
endif()

if(PRIVATE_INCLUDES)
target_include_directories(${TEST_BINARY}
Expand Down
10 changes: 8 additions & 2 deletions tests/cpu/Config_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#include <sys/stat.h>

#if defined(__APPLE__)
#include <TargetConditionals.h>
#endif

#include <pystring.h>

#include "Config.cpp"
Expand Down Expand Up @@ -9845,7 +9849,8 @@ active_views: []
= std::string(OCIO::GetTestFilesDir()) + "/icc-test-1.icc";


#if !defined(OCIO_HEADLESS_ENABLED) && ( defined(__APPLE__) || defined(_WIN32) )
#if !defined(OCIO_HEADLESS_ENABLED) && \
( defined(_WIN32) || ( defined(__APPLE__) && TARGET_OS_OSX ) )

OCIO_CHECK_ASSERT(OCIO::SystemMonitors::Get()->isSupported());

Expand Down Expand Up @@ -10070,7 +10075,8 @@ active_views: [view]
// Only the 'view' view is active.
OCIO_CHECK_EQUAL(1, config->getNumViews("sRGB"));

#if !defined(OCIO_HEADLESS_ENABLED) && ( defined(__APPLE__) || defined(_WIN32) )
#if !defined(OCIO_HEADLESS_ENABLED) && \
( defined(_WIN32) || ( defined(__APPLE__) && TARGET_OS_OSX ) )

OCIO_CHECK_ASSERT(OCIO::SystemMonitors::Get()->isSupported());

Expand Down