Convert macros to functions.
Change-Id: I43f4188d1c33cd5a07eb7a12bf3343af7e6a211f Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
8c207a46e6
commit
9c67364708
@ -121,7 +121,7 @@ macro(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
|
|||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
macro(QT5_GENERATE_MOC infile outfile )
|
function(QT5_GENERATE_MOC infile outfile )
|
||||||
# get include dirs and flags
|
# get include dirs and flags
|
||||||
qt5_get_moc_flags(moc_flags)
|
qt5_get_moc_flags(moc_flags)
|
||||||
get_filename_component(abs_infile ${infile} ABSOLUTE)
|
get_filename_component(abs_infile ${infile} ABSOLUTE)
|
||||||
@ -131,12 +131,12 @@ macro(QT5_GENERATE_MOC infile outfile )
|
|||||||
endif()
|
endif()
|
||||||
qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "")
|
qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "")
|
||||||
set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
|
set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
|
||||||
endmacro()
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
# qt5_wrap_cpp(outfiles inputfile ... )
|
# qt5_wrap_cpp(outfiles inputfile ... )
|
||||||
|
|
||||||
macro(QT5_WRAP_CPP outfiles )
|
function(QT5_WRAP_CPP outfiles )
|
||||||
# get include dirs
|
# get include dirs
|
||||||
qt5_get_moc_flags(moc_flags)
|
qt5_get_moc_flags(moc_flags)
|
||||||
|
|
||||||
@ -154,12 +154,13 @@ macro(QT5_WRAP_CPP outfiles )
|
|||||||
qt5_create_moc_command(${it} ${outfile} "${moc_flags}" "${moc_options}")
|
qt5_create_moc_command(${it} ${outfile} "${moc_flags}" "${moc_options}")
|
||||||
list(APPEND ${outfiles} ${outfile})
|
list(APPEND ${outfiles} ${outfile})
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
# qt5_add_resources(outfiles inputfile ... )
|
# qt5_add_resources(outfiles inputfile ... )
|
||||||
|
|
||||||
macro(QT5_ADD_RESOURCES outfiles )
|
function(QT5_ADD_RESOURCES outfiles )
|
||||||
|
|
||||||
set(options)
|
set(options)
|
||||||
set(oneValueArgs)
|
set(oneValueArgs)
|
||||||
@ -187,7 +188,7 @@ macro(QT5_ADD_RESOURCES outfiles )
|
|||||||
endif()
|
endif()
|
||||||
set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||||
endforeach()
|
endforeach()
|
||||||
# Since this cmake macro is doing the dependency scanning for these files,
|
# Since this cmake function is doing the dependency scanning for these files,
|
||||||
# let's make a configured file and add it as a dependency so cmake is run
|
# let's make a configured file and add it as a dependency so cmake is run
|
||||||
# again when dependencies need to be recomputed.
|
# again when dependencies need to be recomputed.
|
||||||
qt5_make_output_file("${infile}" "" "qrc.depends" out_depends)
|
qt5_make_output_file("${infile}" "" "qrc.depends" out_depends)
|
||||||
@ -199,4 +200,5 @@ macro(QT5_ADD_RESOURCES outfiles )
|
|||||||
DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM)
|
DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM)
|
||||||
list(APPEND ${outfiles} ${outfile})
|
list(APPEND ${outfiles} ${outfile})
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
@ -41,7 +41,7 @@ include(CMakeParseArguments)
|
|||||||
|
|
||||||
# qt5_wrap_ui(outfiles inputfile ... )
|
# qt5_wrap_ui(outfiles inputfile ... )
|
||||||
|
|
||||||
macro(QT5_WRAP_UI outfiles )
|
function(QT5_WRAP_UI outfiles )
|
||||||
set(options)
|
set(options)
|
||||||
set(oneValueArgs)
|
set(oneValueArgs)
|
||||||
set(multiValueArgs OPTIONS)
|
set(multiValueArgs OPTIONS)
|
||||||
@ -61,4 +61,5 @@ macro(QT5_WRAP_UI outfiles )
|
|||||||
MAIN_DEPENDENCY ${infile} VERBATIM)
|
MAIN_DEPENDENCY ${infile} VERBATIM)
|
||||||
list(APPEND ${outfiles} ${outfile})
|
list(APPEND ${outfiles} ${outfile})
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user