capstone, fix build for cmake > 4 (#12867)

This commit is contained in:
Schrijvers Luc
2025-08-30 11:42:06 +02:00
committed by GitHub
parent ee322b194b
commit e3bbf0345b
2 changed files with 27 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ various X86 malware tricks)."
HOMEPAGE="http://www.capstone-engine.org"
COPYRIGHT="2013-2020 COSEINC"
LICENSE="BSD (3-clause)"
REVISION="2"
REVISION="3"
SOURCE_URI="https://github.com/aquynh/capstone/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a"
srcGitRev="27c8950fe865a2326b919444aeb3cf18963d96ba"
@@ -66,6 +66,7 @@ BUILD()
rm -rf build
mkdir build; cd build
cmake .. $cmakeDirArgs -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCAPSTONE_BUILD_STATIC=OFF
make $jobArgs
}

View File

@@ -1,4 +1,4 @@
From 12215d491664fab5e11d359edc70dcda513cc1f2 Mon Sep 17 00:00:00 2001
From 830a06627461e55d68c30a10b7bc358eb3fc5a62 Mon Sep 17 00:00:00 2001
From: Calvin Hill <calvin@hakobaito.co.uk>
Date: Sun, 13 Jan 2019 00:39:39 +0000
Subject: Fix build of fuzztests.
@@ -43,5 +43,28 @@ index c5676dd..1ac5b72 100644
fflush(stdout);
--
2.26.0
2.50.1
From 18993539e53fda342b98608932161e9a80c05a7e Mon Sep 17 00:00:00 2001
From: Luc Schrijvers <begasus@gmail.com>
Date: Sat, 30 Aug 2025 11:37:24 +0200
Subject: Fix building with cmake > 4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 197b6ba..9b4e36b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ if (POLICY CMP0048)
# compatibility. change OLD to NEW when minimum cmake version is updated to 3.* and
# set VERSION using project(capstone VERSION 4.0.0).
# http://www.cmake.org/cmake/help/v3.0/policy/CMP0048.html
- cmake_policy (SET CMP0048 OLD)
+ cmake_policy (SET CMP0048 NEW)
endif()
# to configure the options specify them in in the command line or change them in the cmake UI.
--
2.50.1