forked from qt-creator/qt-creator
Build/translations: Fix if build dir contains regex characters
We need to escape all regex relevant characters before using the build
directory as part of a regex.
Amends fc236d4534
Change-Id: Idfb9e5a1733e153943781888976de97aac4fb8cb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
@@ -33,12 +33,13 @@ function(_extract_ts_data_from_targets outprefix)
|
||||
# exclude various funny source files, and anything generated
|
||||
# like *metatypes.json.gen, moc_*.cpp, qrc_*.cpp, */qmlcache/*.cpp,
|
||||
# *qmltyperegistrations.cpp
|
||||
string(REGEX REPLACE "(\\^|\\$|\\.|\\[|\\]|\\*|\\+|\\?|\\(|\\)|\\|)" "\\\\\\1" binary_dir_regex "${PROJECT_BINARY_DIR}")
|
||||
set(_exclude_patterns
|
||||
.*[.]json[.]in
|
||||
.*[.]svg
|
||||
.*[.]pro
|
||||
.*[.]css
|
||||
"${PROJECT_BINARY_DIR}/.*"
|
||||
"${binary_dir_regex}/.*"
|
||||
)
|
||||
list(JOIN _exclude_patterns "|" _exclude_pattern)
|
||||
list(FILTER _source_files EXCLUDE REGEX "${_exclude_pattern}")
|
||||
|
Reference in New Issue
Block a user