Hi, the attached patch contains a cmake macro for the makekdewidgets code generation tool. Currently there are cutsom commands in at least three diffrent places (libs, pim, edu) to handle this.
Ok to commit? regards Volker
Index: FindKDE4Internal.cmake
===================================================================
--- FindKDE4Internal.cmake (revision 529865)
+++ FindKDE4Internal.cmake (working copy)
@@ -110,6 +110,10 @@
# KDE4_ADD_KCFG_FILES (SRCS_VAR file1.kcfgc ... fileN.kcfgc)
# Use this to add KDE config compiler files to your application/library.
#
+# KDE4_ADD_WIDGET_FILES (SRCS_VAR file1.widgets ... fileN.widgets)
+# Use this to add widget description files for the makekdewidgets code generator
+# for Qt Designer plugins.
+#
# KDE4_AUTOMOC(file1 ... fileN)
# Call this if you want to have automatic moc file handling.
# This means if you include "foo.moc" in the source file foo.cpp
Index: KDE4Macros.cmake
===================================================================
--- KDE4Macros.cmake (revision 529854)
+++ KDE4Macros.cmake (working copy)
@@ -11,6 +11,7 @@
# KDE4_CREATE_FINAL_FILES
# KDE4_ADD_KDEINIT_EXECUTABLE
# KDE4_ADD_EXECUTABLE
+# KDE4_ADD_WIDGET_FILES
[EMAIL PROTECTED]
@@ -554,3 +555,28 @@
MACRO (KDE4_CREATE_DOXYGEN_DOCS)
ENDMACRO (KDE4_CREATE_DOXYGEN_DOCS)
+
+MACRO (KDE4_ADD_WIDGET_FILES _sources)
+ FOREACH (_current_FILE ${ARGN})
+
+ GET_FILENAME_COMPONENT(_input ${_current_FILE} ABSOLUTE)
+ GET_FILENAME_COMPONENT(_basename ${_input} NAME_WE)
+ SET(_source ${CMAKE_CURRENT_BINARY_DIR}/${_basename}widgets.cpp)
+ SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}widgets.moc)
+
+ # create source file from the .widgets file
+ ADD_CUSTOM_COMMAND(OUTPUT ${_source}
+ COMMAND ${KDE4_MAKEKDEWIDGETS_EXECUTABLE}
+ ARGS -o ${_source} ${_input}
+ MAIN_DEPENDENCY ${_input})
+
+ # create moc file
+ QT4_GENERATE_MOC(${_source} ${_moc} )
+ MACRO_ADD_FILE_DEPENDENCIES(${_source} ${_moc})
+
+ SET(${_sources} ${${_sources}} ${_source})
+
+ ENDFOREACH (_current_FILE)
+
+ENDMACRO (KDE4_ADD_WIDGET_FILES)
+
pgpnXSedlYnoR.pgp
Description: PGP signature
_______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
