diff options
author | Tim E. Real <termtech@rogers.com> | 2010-10-19 06:28:13 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-10-19 06:28:13 +0000 |
commit | 7ee5592092707da25bf8cccfe3097f0a2a4a84de (patch) | |
tree | d36c660ecc953c889eb035a860bff57d220a6044 /muse2/cmake/QtWrapMacros.cmake | |
parent | 97a2927e036b484408d493dfb80150fc2b88f1c2 (diff) |
See ChangeLog
Diffstat (limited to 'muse2/cmake/QtWrapMacros.cmake')
-rw-r--r-- | muse2/cmake/QtWrapMacros.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/muse2/cmake/QtWrapMacros.cmake b/muse2/cmake/QtWrapMacros.cmake new file mode 100644 index 00000000..662cabae --- /dev/null +++ b/muse2/cmake/QtWrapMacros.cmake @@ -0,0 +1,28 @@ + ## QT4_WRAP_UI3(outfiles inputfile ... ) + ## + ## Adapted from QT4_WRAP_UI in FindQt4.cmake module, for MusE, by Tim. + ## + ## + + MACRO (QT4_WRAP_UI3 outfiles ) + QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN}) + + FOREACH (it ${ui_files}) + GET_FILENAME_COMPONENT(outfile ${it} NAME_WE) + GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) + SET(outfile_h ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h) + SET(outfile_cpp ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.cpp) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile_h} ${outfile_cpp} + COMMAND ${QT_UIC3_EXECUTABLE} + ARGS ${ui_options} -o ${outfile_h} ${infile} + COMMAND ${QT_UIC3_EXECUTABLE} + ARGS ${ui_options} -o ${outfile_cpp} -impl ${outfile_h} ${infile} + COMMAND ${QT_MOC_EXECUTABLE} + ARGS ${outfile_h} >> ${outfile_cpp} + MAIN_DEPENDENCY ${infile}) + SET(${outfiles} ${${outfiles}} ${outfile_h} ${outfile_cpp}) + ENDFOREACH (it) + + ENDMACRO (QT4_WRAP_UI3) + + |