Fix path quoting in Qt4 macros

Adding VERBATIM to the ADD_CUSTOM_COMMAND calls in the qt4 macros
ensures that paths are properly quoted when passed to the shell.
This fixes issues when building projects that contained paths with
special characters (according to /bin/sh), such as parentheses or
spaces.
This commit is contained in:
Pierre-Francois Laquerre 2011-11-02 16:13:52 -04:00 committed by Clinton Stimpson
parent 901e6d023f
commit 9b07c19f92
1 changed files with 9 additions and 9 deletions

View File

@ -118,7 +118,7 @@ MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile} ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE} COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile} ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile}
DEPENDS ${infile}) DEPENDS ${infile} VERBATIM)
ENDIF (WIN32) ENDIF (WIN32)
ENDMACRO (QT4_CREATE_MOC_COMMAND) ENDMACRO (QT4_CREATE_MOC_COMMAND)
@ -165,7 +165,7 @@ MACRO (QT4_WRAP_UI outfiles )
ADD_CUSTOM_COMMAND(OUTPUT ${outfile} ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_UIC_EXECUTABLE} COMMAND ${QT_UIC_EXECUTABLE}
ARGS ${ui_options} -o ${outfile} ${infile} ARGS ${ui_options} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}) MAIN_DEPENDENCY ${infile} VERBATIM)
SET(${outfiles} ${${outfiles}} ${outfile}) SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH (it) ENDFOREACH (it)
@ -203,7 +203,7 @@ MACRO (QT4_ADD_RESOURCES outfiles )
COMMAND ${QT_RCC_EXECUTABLE} COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile} ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile} MAIN_DEPENDENCY ${infile}
DEPENDS ${_RC_DEPENDS} "${out_depends}") DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM)
SET(${outfiles} ${${outfiles}} ${outfile}) SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH (it) ENDFOREACH (it)
@ -235,7 +235,7 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile} COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
DEPENDS ${_infile}) DEPENDS ${_infile} VERBATIM)
SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
@ -280,7 +280,7 @@ MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options
ADD_CUSTOM_COMMAND(OUTPUT ${_target} ADD_CUSTOM_COMMAND(OUTPUT ${_target}
COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} -o ${_target} COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} -o ${_target}
DEPENDS ${_in_file} DEPENDS ${_in_file} VERBATIM
) )
ENDMACRO(QT4_GENERATE_DBUS_INTERFACE) ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
@ -304,12 +304,12 @@ MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optional
IF(_optionalClassName) IF(_optionalClassName)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
DEPENDS ${_infile} DEPENDS ${_infile} VERBATIM
) )
ELSE(_optionalClassName) ELSE(_optionalClassName)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile} COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
DEPENDS ${_infile} DEPENDS ${_infile} VERBATIM
) )
ENDIF(_optionalClassName) ENDIF(_optionalClassName)
@ -398,7 +398,7 @@ MACRO(QT4_CREATE_TRANSLATION _qm_files)
ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file}
COMMAND ${QT_LUPDATE_EXECUTABLE} COMMAND ${QT_LUPDATE_EXECUTABLE}
ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file} ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file}
DEPENDS ${_my_sources} ${_ts_pro}) DEPENDS ${_my_sources} ${_ts_pro} VERBATIM)
ENDFOREACH(_ts_file) ENDFOREACH(_ts_file)
QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles}) QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles})
ENDMACRO(QT4_CREATE_TRANSLATION) ENDMACRO(QT4_CREATE_TRANSLATION)
@ -419,7 +419,7 @@ MACRO(QT4_ADD_TRANSLATION _qm_files)
ADD_CUSTOM_COMMAND(OUTPUT ${qm} ADD_CUSTOM_COMMAND(OUTPUT ${qm}
COMMAND ${QT_LRELEASE_EXECUTABLE} COMMAND ${QT_LRELEASE_EXECUTABLE}
ARGS ${_abs_FILE} -qm ${qm} ARGS ${_abs_FILE} -qm ${qm}
DEPENDS ${_abs_FILE} DEPENDS ${_abs_FILE} VERBATIM
) )
SET(${_qm_files} ${${_qm_files}} ${qm}) SET(${_qm_files} ${${_qm_files}} ${qm})
ENDFOREACH (_current_FILE) ENDFOREACH (_current_FILE)