summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-07-03 14:16:21 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-03 22:55:13 +0200
commit897d0021dc002afb5b64a2ab527cfc9ce6a13da7 (patch)
tree9e487e136194504b6d25111d70d333edcdf49fd0 /src/dbus
parent6136bfffcec66e05235d5a07691175dddbd7a6de (diff)
Improve basename extraction in qt5_add_dbus_interfaces
This is a forward port of f46903b4b21e5d1c8af9a60e9ea87805b170ed73 in cmake.git. Change-Id: I627b17259182497c1353ccf4cd3fa4a61546be5d Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/Qt5DBusMacros.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dbus/Qt5DBusMacros.cmake b/src/dbus/Qt5DBusMacros.cmake
index 6617d370a9..17068c5cc0 100644
--- a/src/dbus/Qt5DBusMacros.cmake
+++ b/src/dbus/Qt5DBusMacros.cmake
@@ -73,9 +73,10 @@ endfunction()
function(QT5_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})
qt5_add_dbus_interface(${_sources} ${_infile} ${_basename}interface)
endforeach()
set(${_sources} ${${_sources}} PARENT_SCOPE)