summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-05-09 14:37:33 +0200
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-05-31 16:37:25 +0200
commit672a1d022c3aa36151c7b723b0c65e204980c202 (patch)
tree78c2ddff785071f4148c7b7da9e5c465f6adf621 /cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
parent7041d9dd7518ae37a0067e702f6fc1d88506395d (diff)
Implement qt_internal_get_file_path_mode for changing the file path mode
In cases where we allow symlink, we need to use ABSOLUTE path, and don't resolve the symlink. This function returns ABSOLUTE only if we are on Apple platform, and have QT_ALLOW_SYMLINK_IN_PATHS enabled. While this is mainly to resolve the issue report by Homebrew, it might be useful if a user really want to build with symlink. Pick-to: 6.5 Task-number: QTBUG-113463 Change-Id: Ided141ed8de66cc1d3717ec2719eb703fa7fc589 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtBuildInternals/QtBuildInternalsConfig.cmake')
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index 4532cbe928..e487633210 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -1435,3 +1435,19 @@ function(qt_internal_run_common_config_tests)
qt_internal_check_cmp0099_available()
qt_configure_end_summary_section()
endfunction()
+
+# It is used in QtWebEngine to replace the REALPATH with ABSOLUTE path, which is
+# useful for building Qt in Homebrew.
+function(qt_internal_get_filename_path_mode out_var)
+ set(mode REALPATH)
+ if(APPLE AND QT_ALLOW_SYMLINK_IN_PATHS)
+ set(mode ABSOLUTE)
+ message(WARNING
+ "QT_ALLOW_SYMLINK_IN_PATHS is enabled. "
+ "This is not recommended, and it may lead to unexpected issues. "
+ "E.g., When building QtWebEngine, enabling this option may result in build "
+ "issues in certain platforms. See https://bugreports.qt.io/browse/QTBUG-59769."
+ )
+ endif()
+ set(${out_var} ${mode} PARENT_SCOPE)
+endfunction()