[x265] [PATCH] Fix for CMake Errors in MacOS
Yaswanth Sastry
yaswanth.sastry at multicorewareinc.com
Fri Apr 4 13:59:39 UTC 2025
>From bac7325fec4dacef7a3db8595f7b5afcd7a4b3a4 Mon Sep 17 00:00:00 2001
From: yaswanthsastry <yaswanth.sastry at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20250404/663b4aa3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 1444 bytes
Desc: patch.diff
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20250404/663b4aa3/attachment.obj>
More information about the x265-devel
mailing list