184 lines
6.5 KiB
Diff
184 lines
6.5 KiB
Diff
From 0203237f25f93899c69773ca37194d1781c5fba1 Mon Sep 17 00:00:00 2001
|
|
From: Christophe Marin <christophe@krop.fr>
|
|
Date: Tue, 1 Apr 2025 18:02:14 +0200
|
|
Subject: [PATCH] Fix build with CMake 4
|
|
|
|
---
|
|
CMakeLists.txt | 5 ++---
|
|
examples/samplebinding/CMakeLists.txt | 4 ++--
|
|
examples/scriptableapplication/CMakeLists.txt | 4 ++--
|
|
examples/widgetbinding/CMakeLists.txt | 4 ++--
|
|
sources/pyside2-tools/CMakeLists.txt | 2 +-
|
|
sources/pyside2/CMakeLists.txt | 4 ++--
|
|
sources/pyside2/doc/CMakeLists.txt | 4 ++--
|
|
sources/pyside2/tests/pysidetest/CMakeLists.txt | 2 +-
|
|
sources/shiboken2/ApiExtractor/CMakeLists.txt | 4 ++--
|
|
sources/shiboken2/CMakeLists.txt | 4 ++--
|
|
sources/shiboken2/doc/CMakeLists.txt | 2 +-
|
|
sources/shiboken2/tests/CMakeLists.txt | 2 +-
|
|
sources/shiboken2/tests/test_generator/CMakeLists.txt | 2 +-
|
|
13 files changed, 21 insertions(+), 22 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 595489d..803fe79 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -1,9 +1,8 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
-cmake_policy(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
|
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build Type")
|
|
|
|
-project(pyside2_super_project)
|
|
+project(pyside2_super_project VERSION 5.15.16)
|
|
|
|
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
|
|
message(FATAL_ERROR "In-source builds are not allowed.")
|
|
diff --git a/examples/samplebinding/CMakeLists.txt b/examples/samplebinding/CMakeLists.txt
|
|
index cb61358..f7651e0 100644
|
|
--- a/examples/samplebinding/CMakeLists.txt
|
|
+++ b/examples/samplebinding/CMakeLists.txt
|
|
@@ -1,5 +1,5 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
-cmake_policy(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
+cmake_policy(VERSION 3.16)
|
|
|
|
# Enable policy to not use RPATH settings for install_name on macOS.
|
|
if(POLICY CMP0068)
|
|
diff --git a/examples/scriptableapplication/CMakeLists.txt b/examples/scriptableapplication/CMakeLists.txt
|
|
index 5277d17..7fe3b25 100644
|
|
--- a/examples/scriptableapplication/CMakeLists.txt
|
|
+++ b/examples/scriptableapplication/CMakeLists.txt
|
|
@@ -1,5 +1,5 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
-cmake_policy(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
+cmake_policy(VERSION 3.16)
|
|
|
|
# Enable policy to run automoc on generated files.
|
|
if(POLICY CMP0071)
|
|
diff --git a/examples/widgetbinding/CMakeLists.txt b/examples/widgetbinding/CMakeLists.txt
|
|
index a557f90..2966e63 100644
|
|
--- a/examples/widgetbinding/CMakeLists.txt
|
|
+++ b/examples/widgetbinding/CMakeLists.txt
|
|
@@ -1,5 +1,5 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
-cmake_policy(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
+cmake_policy(VERSION 3.16)
|
|
|
|
# Enable policy to not use RPATH settings for install_name on macOS.
|
|
if(POLICY CMP0068)
|
|
diff --git a/sources/pyside2-tools/CMakeLists.txt b/sources/pyside2-tools/CMakeLists.txt
|
|
index ce65750..1492cdf 100644
|
|
--- a/sources/pyside2-tools/CMakeLists.txt
|
|
+++ b/sources/pyside2-tools/CMakeLists.txt
|
|
@@ -1,4 +1,4 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
project(pyside2-tools)
|
|
|
|
# Don't display "up-to-date / install" messages when installing, to reduce visual clutter.
|
|
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
|
|
index 4336d6c..a944017 100644
|
|
--- a/sources/pyside2/CMakeLists.txt
|
|
+++ b/sources/pyside2/CMakeLists.txt
|
|
@@ -1,7 +1,7 @@
|
|
include(cmake/Macros/icecc.cmake) # this must be the first line!
|
|
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
-cmake_policy(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
+cmake_policy(VERSION 3.16)
|
|
|
|
# Don't ignore targets that do not exist, inside add_dependencies calls.
|
|
cmake_policy(SET CMP0046 NEW)
|
|
diff --git a/sources/pyside2/doc/CMakeLists.txt b/sources/pyside2/doc/CMakeLists.txt
|
|
index 950e486..77747a4 100644
|
|
--- a/sources/pyside2/doc/CMakeLists.txt
|
|
+++ b/sources/pyside2/doc/CMakeLists.txt
|
|
@@ -1,5 +1,5 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
-cmake_policy(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
+cmake_policy(VERSION 3.16)
|
|
|
|
project(doc)
|
|
|
|
diff --git a/sources/pyside2/tests/pysidetest/CMakeLists.txt b/sources/pyside2/tests/pysidetest/CMakeLists.txt
|
|
index 0dbd2b7..71d92f1 100644
|
|
--- a/sources/pyside2/tests/pysidetest/CMakeLists.txt
|
|
+++ b/sources/pyside2/tests/pysidetest/CMakeLists.txt
|
|
@@ -1,7 +1,7 @@
|
|
project(pysidetest)
|
|
project(testbinding)
|
|
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
|
|
set(QT_USE_QTCORE 1)
|
|
# no more supported: include(${QT_USE_FILE})
|
|
diff --git a/sources/shiboken2/ApiExtractor/CMakeLists.txt b/sources/shiboken2/ApiExtractor/CMakeLists.txt
|
|
index b081bed..1a8b66c 100644
|
|
--- a/sources/shiboken2/ApiExtractor/CMakeLists.txt
|
|
+++ b/sources/shiboken2/ApiExtractor/CMakeLists.txt
|
|
@@ -1,7 +1,7 @@
|
|
project(apiextractor)
|
|
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
-cmake_policy(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
+cmake_policy(VERSION 3.16)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
|
|
index c654602..e9f37cf 100644
|
|
--- a/sources/shiboken2/CMakeLists.txt
|
|
+++ b/sources/shiboken2/CMakeLists.txt
|
|
@@ -1,7 +1,7 @@
|
|
Include(icecc.cmake)
|
|
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
-cmake_policy(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
+cmake_policy(VERSION 3.16)
|
|
|
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build Type")
|
|
|
|
diff --git a/sources/shiboken2/doc/CMakeLists.txt b/sources/shiboken2/doc/CMakeLists.txt
|
|
index ae4858f..5f59bfb 100644
|
|
--- a/sources/shiboken2/doc/CMakeLists.txt
|
|
+++ b/sources/shiboken2/doc/CMakeLists.txt
|
|
@@ -1,4 +1,4 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
|
|
if(FULLDOCSBUILD EQUAL 0)
|
|
project(shiboken2_doc)
|
|
diff --git a/sources/shiboken2/tests/CMakeLists.txt b/sources/shiboken2/tests/CMakeLists.txt
|
|
index 2ba951d..fcd3f43 100644
|
|
--- a/sources/shiboken2/tests/CMakeLists.txt
|
|
+++ b/sources/shiboken2/tests/CMakeLists.txt
|
|
@@ -1,4 +1,4 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
|
|
if(BUILD_TESTS)
|
|
find_package(Qt${QT_MAJOR_VERSION}Test 5.12 REQUIRED)
|
|
diff --git a/sources/shiboken2/tests/test_generator/CMakeLists.txt b/sources/shiboken2/tests/test_generator/CMakeLists.txt
|
|
index 07611e3..b48ae37 100644
|
|
--- a/sources/shiboken2/tests/test_generator/CMakeLists.txt
|
|
+++ b/sources/shiboken2/tests/test_generator/CMakeLists.txt
|
|
@@ -1,4 +1,4 @@
|
|
-cmake_minimum_required(VERSION 3.1)
|
|
+cmake_minimum_required(VERSION 3.16)
|
|
project(test_generator)
|
|
|
|
set(dummy_generator_SRC dummygenerator.cpp)
|
|
--
|
|
2.49.0
|
|
|