summaryrefslogtreecommitdiffstats
path: root/Modules/Qt4Macros.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-06-20 11:23:40 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-06-20 16:31:37 (GMT)
commitf46903b4b21e5d1c8af9a60e9ea87805b170ed73 (patch)
tree1e8443328de76e66945b48c77836f225aa870467 /Modules/Qt4Macros.cmake
parentaa841ae3f388d537d5a12695b9b3e617a43caca8 (diff)
downloadCMake-f46903b4b21e5d1c8af9a60e9ea87805b170ed73.zip
CMake-f46903b4b21e5d1c8af9a60e9ea87805b170ed73.tar.gz
CMake-f46903b4b21e5d1c8af9a60e9ea87805b170ed73.tar.bz2
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
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r--Modules/Qt4Macros.cmake3
1 files changed, 2 insertions, 1 deletions
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)