diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2010-08-24 18:41:14 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2010-08-24 18:41:14 (GMT) |
commit | 2756311a9aa9b17bc451a1293d2cfb7e6e8e719b (patch) | |
tree | 7c11e92f2bd43b346d4233177ab7f77c167b98c4 /Modules/Qt4Macros.cmake | |
parent | 0f5189d144df43b1fee80146522a4675162afae3 (diff) | |
download | CMake-2756311a9aa9b17bc451a1293d2cfb7e6e8e719b.zip CMake-2756311a9aa9b17bc451a1293d2cfb7e6e8e719b.tar.gz CMake-2756311a9aa9b17bc451a1293d2cfb7e6e8e719b.tar.bz2 |
Make sure moc parameters file goes in binary directory.
Fix bug 11120. Parameters files previously went into source
directory when qt4_generate_moc() was given relative paths.
Also simplified some logic for absolute paths.
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r-- | Modules/Qt4Macros.cmake | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 10cf1d1..700d3a2 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -129,7 +129,11 @@ MACRO (QT4_GENERATE_MOC infile outfile ) # get include dirs and flags QT4_GET_MOC_FLAGS(moc_flags) GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE) - QT4_CREATE_MOC_COMMAND(${abs_infile} ${outfile} "${moc_flags}" "") + SET(_outfile "${outfile}") + IF(NOT IS_ABSOLUTE "${outfile}") + SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") + ENDIF(NOT IS_ABSOLUTE "${outfile}") + QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "") SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file ENDMACRO (QT4_GENERATE_MOC) @@ -187,10 +191,9 @@ MACRO (QT4_ADD_RESOURCES outfiles ) SET(_RC_DEPENDS) FOREACH(_RC_FILE ${_RC_FILES}) STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}") - STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}") - IF(NOT _ABS_PATH_INDICATOR) + IF(NOT IS_ABSOLUTE "${_RC_FILE}") SET(_RC_FILE "${rc_path}/${_RC_FILE}") - ENDIF(NOT _ABS_PATH_INDICATOR) + ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}") SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") ENDFOREACH(_RC_FILE) ADD_CUSTOM_COMMAND(OUTPUT ${outfile} |