diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-01-08 12:30:57 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-01-08 12:35:24 +0100 |
commit | ad16478a76815f8f61d454bf7760aaf9ffbb4b51 (patch) | |
tree | eefdd9219cc9d59b62e042f49fc7555b980cb7a4 /src/corelib/Qt5CoreMacros.cmake | |
parent | 80a741f3616290897ba0d9f1cbd3c9c5ee62da37 (diff) | |
parent | 09c92863001790a0304a5ef389901ee2b5b6cdc2 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Based on merge done by Liang Qi
Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
Diffstat (limited to 'src/corelib/Qt5CoreMacros.cmake')
-rw-r--r-- | src/corelib/Qt5CoreMacros.cmake | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake index c0a8c62b04..0c33335ae9 100644 --- a/src/corelib/Qt5CoreMacros.cmake +++ b/src/corelib/Qt5CoreMacros.cmake @@ -94,7 +94,7 @@ endmacro() # helper macro to set up a moc rule -function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) +function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target moc_depends) # Pass the parameters in a file. Set the working directory to # be that containing the parameters file and reference it by # just the file name. This is necessary because the moc tool on @@ -131,7 +131,7 @@ function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) set(_moc_extra_parameters_file @${_moc_parameters_file}) add_custom_command(OUTPUT ${outfile} COMMAND ${Qt5Core_MOC_EXECUTABLE} ${_moc_extra_parameters_file} - DEPENDS ${infile} + DEPENDS ${infile} ${moc_depends} ${_moc_working_dir} VERBATIM) endfunction() @@ -151,7 +151,7 @@ function(QT5_GENERATE_MOC infile outfile ) endif() set(moc_target ${ARGV3}) endif() - qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}") + qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}" "") set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file endfunction() @@ -164,13 +164,14 @@ function(QT5_WRAP_CPP outfiles ) set(options) set(oneValueArgs TARGET) - set(multiValueArgs OPTIONS) + set(multiValueArgs OPTIONS DEPENDS) cmake_parse_arguments(_WRAP_CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) set(moc_files ${_WRAP_CPP_UNPARSED_ARGUMENTS}) set(moc_options ${_WRAP_CPP_OPTIONS}) set(moc_target ${_WRAP_CPP_TARGET}) + set(moc_depends ${_WRAP_CPP_DEPENDS}) if (moc_target AND CMAKE_VERSION VERSION_LESS 2.8.12) message(FATAL_ERROR "The TARGET parameter to qt5_wrap_cpp is only available when using CMake 2.8.12 or later.") @@ -178,7 +179,7 @@ function(QT5_WRAP_CPP outfiles ) foreach(it ${moc_files}) get_filename_component(it ${it} ABSOLUTE) qt5_make_output_file(${it} moc_ cpp outfile) - qt5_create_moc_command(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}") + qt5_create_moc_command(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}" "${moc_depends}") list(APPEND ${outfiles} ${outfile}) endforeach() set(${outfiles} ${${outfiles}} PARENT_SCOPE) |