diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2024-03-15 17:41:22 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-03-17 07:17:52 +0000 |
commit | dddd655223f8dbfcd16fb04fa9c7a1d9ba8fb3d0 (patch) | |
tree | 31b9d1555da2bf3ed95fafc026e51cff99890b53 | |
parent | 0b6536bcb56f4092a20422cee24859b6513788fe (diff) |
CMake: Fix 'file to open is a directory' on update_translations
To feed lupdate a list of source files we generate a .cmake file with a
$<TARGET_PROPERTY:foo,SOURCES> expression. Apparently, this list of
sources can contain empty entries, stemming from INTERFACE_SOURCES with
generator expressions that evaluate to the empty string.
Filter out those empty entries when generating lupdate's .json file from
that .cmake file.
Fixes: QTBUG-123338
Change-Id: I1dc383d6c75da7af560a50071c390f18321be066
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e8b61043a6c152f0f9593d9b798a7cd3e9c1f596)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 10b08bbde0d64b89720f1c54b9ac8f471cfc7874)
-rw-r--r-- | src/linguist/GenerateLUpdateProject.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linguist/GenerateLUpdateProject.cmake b/src/linguist/GenerateLUpdateProject.cmake index 64c383867..40854aa8d 100644 --- a/src/linguist/GenerateLUpdateProject.cmake +++ b/src/linguist/GenerateLUpdateProject.cmake @@ -92,6 +92,9 @@ endif() foreach(path_var IN LISTS path_variables) set(absolute_${path_var} "") foreach(path IN LISTS lupdate_${path_var}) + if(path STREQUAL "") + continue() + endif() if(NOT IS_ABSOLUTE "${path}") if(path_var MATCHES "^subproject[0-9]+_") set(base_dir "${lupdate_${CMAKE_MATCH_0}source_dir}") |