diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-04-13 19:26:15 +0200 |
---|---|---|
committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-04-14 18:34:05 +0200 |
commit | 389b3a131a03b819f2dd01c53222d185170e1924 (patch) | |
tree | bd65c563d014db59a754f63097f79f53753e65aa /cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt | |
parent | 38d56e2b72f61c662d79b8aad9dff4f4f1a0211a (diff) |
Add drive letter to source paths when calling qt-internal- scripts
Like qt-configure-module.bat, when building with unity build, CMake
needs to know the full path of the source directory to be able to
correctly generate its `*_cxx.cxx` files. So far, this seems to only
affect Windows' LLVM/MinGW builds. By this patch, I make sure that we
pass the full path to CMake.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ida2da127ecba95856b6e0091936c471c2a116936
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt')
-rw-r--r-- | cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt index 73ed57c1da..3de43f5885 100644 --- a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt +++ b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt @@ -18,6 +18,9 @@ else() set(absolute_project_path "${QT_STANDALONE_TEST_PATH}") endif() +# If path does not include the drive letter, we try to add it. +get_filename_component(absolute_project_path "." REALPATH BASE_DIR "${absolute_project_path}") + if(NOT IS_DIRECTORY "${absolute_project_path}") get_filename_component(filename "${absolute_project_path}" NAME) get_filename_component(directory "${absolute_project_path}" DIRECTORY) |