>From bac7325fec4dacef7a3db8595f7b5afcd7a4b3a4 Mon Sep 17 00:00:00 2001
From: yaswanthsastry <yaswanth.sas...@multicorewareinc.com>
Date: Fri, 4 Apr 2025 14:11:08 +0530
Subject: [PATCH] Fix for CMake Errors in MacOS

---
 source/CMakeLists.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 4f5b3ed82..fa4fb7036 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -6,8 +6,10 @@ if(NOT CMAKE_BUILD_TYPE)
         FORCE)
 endif()
 message(STATUS "cmake version ${CMAKE_VERSION}")
-if(POLICY CMP0025)
-    cmake_policy(SET CMP0025 NEW) # report Apple's Clang as just Clang
+if(APPLE)
+    if(POLICY CMP0025)
+        cmake_policy(SET CMP0025 NEW) # report Apple's Clang as just Clang
+    endif()
 endif()
 if(POLICY CMP0042)
     cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
@@ -17,7 +19,7 @@ if(POLICY CMP0054)
 endif()

 project (x265)
-cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
+cmake_minimum_required (VERSION 2.8.8...3.10) # OBJECT libraries require 2.8.8
 include(CheckIncludeFiles)
 include(CheckFunctionExists)
 include(CheckSymbolExists)
@@ -168,7 +170,7 @@ if(APPLE)
   add_definitions(-DMACOS=1)
 endif()

-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "AppleClang|Clang")
     set(CLANG 1)
 endif()
 if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
--
2.37.3.windows.1




Attachment: patch.diff
Description: patch.diff

_______________________________________________
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to