[CMake] Qt4 LUpdate and Blanks in the Build Directory Path
Clinton Stimpson
clinton at elemtech.com
Wed May 6 10:32:17 EDT 2009
Allen Barnett wrote:
> I (unwisely) created the build directory for a Qt4 project in a path
> with blanks in the directory names. The QT4_CREATE_TRANSLATION macro in
> FindQt4.cmake generates a minimal .pro file for the use of lupdate. When
> the macro writes the _lupdate.pro file, it doesn't take into account
> that the source files may have blanks in their path, leading to a bad
> _lupdate.pro file.
> This is in cmake 2.6.4.
> Thanks,
> Allen
>
>
Can you verify the following patch fixes it?
Thanks,
Clint
Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.159
diff -u -r1.159 FindQt4.cmake
--- FindQt4.cmake 6 May 2009 13:44:36 -0000 1.159
+++ FindQt4.cmake 6 May 2009 14:23:41 -0000
@@ -1253,7 +1253,10 @@
# long for some systems
GET_FILENAME_COMPONENT(_ts_name ${_ts_file} NAME_WE)
SET(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
- STRING(REPLACE ";" " " _pro_srcs "${_my_sources}")
+ SET(_pro_srcs)
+ FOREACH(_pro_src ${_my_sources})
+ SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
+ ENDFOREACH(_pro_src ${_my_sources})
FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}")
ENDIF(_my_sources)
ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file}
More information about the CMake
mailing list