summaryrefslogtreecommitdiffstats
path: root/Modules/Qt4Macros.cmake
diff options
context:
space:
mode:
authorPierre-Francois Laquerre <pierre.francois@gmail.com>2011-11-02 20:13:52 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2011-12-04 00:51:24 (GMT)
commit9b07c19f9239241f81a74128f9abc088ccb91636 (patch)
tree9ab85af4d0125cbe54edbcf6b7e1923693366504 /Modules/Qt4Macros.cmake
parent901e6d023f3027ab2256a178fcff113fda66106f (diff)
downloadCMake-9b07c19f9239241f81a74128f9abc088ccb91636.zip
CMake-9b07c19f9239241f81a74128f9abc088ccb91636.tar.gz
CMake-9b07c19f9239241f81a74128f9abc088ccb91636.tar.bz2
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.
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r--Modules/Qt4Macros.cmake18
1 files changed, 9 insertions, 9 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 630a0ba..4da1a3f 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -118,7 +118,7 @@ MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile}
- DEPENDS ${infile})
+ DEPENDS ${infile} VERBATIM)
ENDIF (WIN32)
ENDMACRO (QT4_CREATE_MOC_COMMAND)
@@ -165,7 +165,7 @@ MACRO (QT4_WRAP_UI outfiles )
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_UIC_EXECUTABLE}
ARGS ${ui_options} -o ${outfile} ${infile}
- MAIN_DEPENDENCY ${infile})
+ MAIN_DEPENDENCY ${infile} VERBATIM)
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH (it)
@@ -203,7 +203,7 @@ MACRO (QT4_ADD_RESOURCES outfiles )
COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
- DEPENDS ${_RC_DEPENDS} "${out_depends}")
+ DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM)
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH (it)
@@ -235,7 +235,7 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
- DEPENDS ${_infile})
+ DEPENDS ${_infile} VERBATIM)
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}
COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} -o ${_target}
- DEPENDS ${_in_file}
+ DEPENDS ${_in_file} VERBATIM
)
ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
@@ -304,12 +304,12 @@ MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optional
IF(_optionalClassName)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
- DEPENDS ${_infile}
+ DEPENDS ${_infile} VERBATIM
)
ELSE(_optionalClassName)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
- DEPENDS ${_infile}
+ DEPENDS ${_infile} VERBATIM
)
ENDIF(_optionalClassName)
@@ -398,7 +398,7 @@ MACRO(QT4_CREATE_TRANSLATION _qm_files)
ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file}
COMMAND ${QT_LUPDATE_EXECUTABLE}
ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file}
- DEPENDS ${_my_sources} ${_ts_pro})
+ DEPENDS ${_my_sources} ${_ts_pro} VERBATIM)
ENDFOREACH(_ts_file)
QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles})
ENDMACRO(QT4_CREATE_TRANSLATION)
@@ -419,7 +419,7 @@ MACRO(QT4_ADD_TRANSLATION _qm_files)
ADD_CUSTOM_COMMAND(OUTPUT ${qm}
COMMAND ${QT_LRELEASE_EXECUTABLE}
ARGS ${_abs_FILE} -qm ${qm}
- DEPENDS ${_abs_FILE}
+ DEPENDS ${_abs_FILE} VERBATIM
)
SET(${_qm_files} ${${_qm_files}} ${qm})
ENDFOREACH (_current_FILE)