[Cmake-commits] CMake branch, next, updated. v2.8.8-3274-gff91125
Rolf Eike Beer
eike at sf-mail.de
Wed Jun 20 12:32:09 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via ff911253351b29db9b66aea785b6e790db8a3622 (commit)
via 0331a5adde45583e3bca351f2814aea971474671 (commit)
via f46903b4b21e5d1c8af9a60e9ea87805b170ed73 (commit)
via aa841ae3f388d537d5a12695b9b3e617a43caca8 (commit)
from 31b47642977c95e1b45a91db167f0a4329dbf7e9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff911253351b29db9b66aea785b6e790db8a3622
commit ff911253351b29db9b66aea785b6e790db8a3622
Merge: 31b4764 0331a5a
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Jun 20 12:32:06 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jun 20 12:32:06 2012 -0400
Merge topic 'qt4-macros' into next
0331a5a Qt4Macros: add some quotes to prevent damage from spaces in the paths
f46903b Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACES
aa841ae FindQt4: extend documentation
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0331a5adde45583e3bca351f2814aea971474671
commit 0331a5adde45583e3bca351f2814aea971474671
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Jun 20 13:29:45 2012 +0200
Commit: Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Wed Jun 20 18:31:38 2012 +0200
Qt4Macros: add some quotes to prevent damage from spaces in the paths
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 7170711..68f3c80 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -220,9 +220,9 @@ ENDMACRO (QT4_ADD_RESOURCES)
MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE)
- SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
- SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
+ SET(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
+ SET(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
+ SET(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE)
IF(_nonamespace)
@@ -241,16 +241,16 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
SET(_params ${_params} -i ${_include})
ENDIF(_include)
- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+ ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
DEPENDS ${_infile} VERBATIM)
- SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
+ SET_SOURCE_FILES_PROPERTIES("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE)
- QT4_GENERATE_MOC(${_header} ${_moc})
+ QT4_GENERATE_MOC("${_header}" "${_moc}")
- SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
- MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
+ LIST(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
+ MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}")
ENDMACRO(QT4_ADD_DBUS_INTERFACE)
@@ -306,27 +306,27 @@ MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optional
ENDIF (_optionalBasename)
SET(_optionalClassName "${ARGV5}")
- SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
- SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
+ SET(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
+ SET(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
+ SET(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
IF(_optionalClassName)
- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+ ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
DEPENDS ${_infile} VERBATIM
)
ELSE(_optionalClassName)
- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+ ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
DEPENDS ${_infile} VERBATIM
)
ENDIF(_optionalClassName)
- QT4_GENERATE_MOC(${_header} ${_moc})
- SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
- MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
+ QT4_GENERATE_MOC("${_header}" "${_moc}")
+ SET_SOURCE_FILES_PROPERTIES("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE)
+ MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}")
- SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
+ LIST(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
ENDMACRO(QT4_ADD_DBUS_ADAPTOR)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f46903b4b21e5d1c8af9a60e9ea87805b170ed73
commit f46903b4b21e5d1c8af9a60e9ea87805b170ed73
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Jun 20 13:23:40 2012 +0200
Commit: Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Wed Jun 20 18:31:37 2012 +0200
Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACES
-convert the filename to lowercase before the extraction, this allows this to
work even if the filename as uppercase ".XML" extension
-use get_filename_component(... NAME) to strip the path
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index f867bc5..7170711 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -258,9 +258,10 @@ ENDMACRO(QT4_ADD_DBUS_INTERFACE)
MACRO(QT4_ADD_DBUS_INTERFACES _sources)
FOREACH (_current_FILE ${ARGN})
GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
+ GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME)
# get the part before the ".xml" suffix
- STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE})
STRING(TOLOWER ${_basename} _basename)
+ STRING(REGEX REPLACE "(.*\\.)?([^\\.]+)\\.xml" "\\2" _basename ${_basename})
QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
ENDFOREACH (_current_FILE)
ENDMACRO(QT4_ADD_DBUS_INTERFACES)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa841ae3f388d537d5a12695b9b3e617a43caca8
commit aa841ae3f388d537d5a12695b9b3e617a43caca8
Author: Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Wed Jun 20 13:11:40 2012 +0200
Commit: Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Wed Jun 20 18:31:37 2012 +0200
FindQt4: extend documentation
-refer to AUTOMOC from QT4_AUTOMOC
-mention how source file properties influence QT4_ADD_DBUS_INTERFACE
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 391797e..2f1708d 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -102,15 +102,28 @@
# accompanying header file foo.h.
# If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.
#
+# You should have a look on the AUTOMOC property for targets to achieve the same results.
+#
# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
-# create a the interface header and implementation files with the
+# Create a the interface header and implementation files with the
# given basename from the given interface xml file and add it to
-# the list of sources
+# the list of sources.
+#
+# You can pass additional parameters to the qdbusxml2cpp call by setting
+# properties on the input file:
+#
+# INCLUDE the given file will be included in the generate interface header
+#
+# CLASSNAME the generated class is named accordingly
+#
+# NO_NAMESPACE the generated class is not wrapped in a namespace
#
# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
-# create the interface header and implementation files
-# for all listed interface xml files
-# the name will be automatically determined from the name of the xml file
+# Create the interface header and implementation files
+# for all listed interface xml files.
+# The basename will be automatically determined from the name of the xml file.
+#
+# The source file properties described for QT4_ADD_DBUS_INTERFACE also apply here.
#
# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
# create a dbus adaptor (header and implementation file) from the xml file
@@ -217,7 +230,7 @@
# QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
# QT_QAXSERVER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore"
-# QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus"
+# QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus"
# QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner"
# QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner"
# QT_QTGUI_INCLUDE_DIR Path to "include/QtGui"
-----------------------------------------------------------------------
Summary of changes:
Modules/FindQt4.cmake | 25 +++++++++++++++++++------
Modules/Qt4Macros.cmake | 37 +++++++++++++++++++------------------
2 files changed, 38 insertions(+), 24 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list