anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / development / libraries / qt-6 / patches / 0004-qtbase-qt-cmake-always-use-cmake-from-path.patch
blob56d19e0bb817f68f33c100f575bd019336c689e2
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Nick Cao <nickcao@nichi.co>
3 Date: Wed, 12 Apr 2023 10:13:50 +0800
4 Subject: [PATCH] qtbase: qt-cmake: always use cmake from path
6 The generated qt-cmake scripts embeds the absolute path of cmake used
7 during the build of qtbase, bloating the runtime closure of qtbase.
8 ---
9 bin/qt-cmake-create.in | 7 +------
10 bin/qt-cmake.in | 7 +------
11 2 files changed, 2 insertions(+), 12 deletions(-)
13 diff --git a/bin/qt-cmake-create.in b/bin/qt-cmake-create.in
14 index 7865d0fe91b..884dc4aba93 100755
15 --- a/bin/qt-cmake-create.in
16 +++ b/bin/qt-cmake-create.in
17 @@ -7,12 +7,7 @@ HELP_MESSAGE="Usage
18 script_dir_path=`dirname $0`
19 script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
21 -# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.
22 -original_cmake_path="@CMAKE_COMMAND@"
23 -cmake_path=$original_cmake_path
24 -if ! test -f "$cmake_path"; then
25 - cmake_path="cmake"
26 -fi
27 +cmake_path="cmake"
29 if [ "$#" -gt 1 ]; then
30 echo "Invalid number of arguments"
31 diff --git a/bin/qt-cmake.in b/bin/qt-cmake.in
32 index f719257f602..571ffe788fa 100755
33 --- a/bin/qt-cmake.in
34 +++ b/bin/qt-cmake.in
35 @@ -4,12 +4,7 @@
36 script_dir_path=`dirname $0`
37 script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
39 -# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.
40 -original_cmake_path="@CMAKE_COMMAND@"
41 -cmake_path=$original_cmake_path
42 -if ! test -f "$cmake_path"; then
43 - cmake_path="cmake"
44 -fi
45 +cmake_path="cmake"
47 toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake"