From 89bd5a7e733a64b694abf16b8d227dbbdd2d3ef7 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Mon, 25 Nov 2019 11:59:48 +0100 Subject: [PATCH] Replace get_filename_component usage with REGEX_REPLACE Replace get_filename_component usage with custom string REGEX_REPLACE to avoid cutting non-ending suffices while moc generation Fixes: QTBUG-80295 Change-Id: I8cdb729370c6d884f6638d172ee523fdc2df5404 Reviewed-by: Joerg Bornemann --- src/corelib/Qt5CoreMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake index 3a60b8e0d2d..7735e51012b 100644 --- a/src/corelib/Qt5CoreMacros.cmake +++ b/src/corelib/Qt5CoreMacros.cmake @@ -59,7 +59,7 @@ macro(QT5_MAKE_OUTPUT_FILE infile prefix ext outfile ) set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") string(REPLACE ".." "__" _outfile ${_outfile}) get_filename_component(outpath ${_outfile} PATH) - get_filename_component(_outfile ${_outfile} NAME_WE) + string(REGEX REPLACE "\\.[^.]*$" "" _outfile ${_outfile}) file(MAKE_DIRECTORY ${outpath}) set(${outfile} ${outpath}/${prefix}${_outfile}.${ext}) endmacro()