From 1cb4f33dfb8a62f3b1d25e52e428012656518566 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 8 Jul 2022 14:15:11 +0200 Subject: [PATCH] CMake build: Fix include paths passed to lupdate The include paths that we extract from the targets often still contain the generator expression, like $. Throw away "paths" with generator expressions that we don't care about, and strip the BUILD_INTERFACE expression around the paths, which are the ones that we do care about. This wasn't only partially relevant so far, though it probably was the reason for the need for fully qualified tr(...) calls at some places. It becomes essential when we move to the ::Tr class, which requires an include to tr.h, which is otherwise not found for files that are not in the same directory. Change-Id: I7a0183f002973069839920ec29944342cfd91721 Reviewed-by: hjk Reviewed-by: Cristian Adam --- cmake/QtCreatorTranslations.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/QtCreatorTranslations.cmake b/cmake/QtCreatorTranslations.cmake index 2e9c564b8ff..2dab35b3b27 100644 --- a/cmake/QtCreatorTranslations.cmake +++ b/cmake/QtCreatorTranslations.cmake @@ -18,6 +18,9 @@ function(_extract_ts_data_from_targets outprefix) if (NOT _skip_translation) if(_include_dirs) + list(FILTER _include_dirs EXCLUDE REGEX "\\$]+)>" "\\1") list(APPEND _includes ${_include_dirs}) endif()