aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/x265/fix-cmake-4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/x265/fix-cmake-4.patch')
-rw-r--r--vcpkg/ports/x265/fix-cmake-4.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/vcpkg/ports/x265/fix-cmake-4.patch b/vcpkg/ports/x265/fix-cmake-4.patch
new file mode 100644
index 0000000..8874265
--- /dev/null
+++ b/vcpkg/ports/x265/fix-cmake-4.patch
@@ -0,0 +1,39 @@
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index 8a9ec44542..54f000c6d4 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ # vim: syntax=cmake
++cmake_minimum_required (VERSION 3.10)
+ if(NOT CMAKE_BUILD_TYPE)
+ # default to Release build for GCC builds
+ set(CMAKE_BUILD_TYPE Release CACHE STRING
+@@ -6,18 +7,9 @@ if(NOT CMAKE_BUILD_TYPE)
+ FORCE)
+ endif()
+ message(STATUS "cmake version ${CMAKE_VERSION}")
+-if(POLICY CMP0025)
+- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
+-endif()
+-if(POLICY CMP0042)
+- cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
+-endif()
+-if(POLICY CMP0054)
+- cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted
+-endif()
+
+ project (x265)
+-cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
++
+ include(CheckIncludeFiles)
+ include(CheckFunctionExists)
+ include(CheckSymbolExists)
+@@ -171,7 +163,7 @@ if(APPLE)
+ add_definitions(-DMACOS=1)
+ endif()
+
+-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
++if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+ set(CLANG 1)
+ endif()
+ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")