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()