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
This commit is contained in:
parent
aa841ae3f3
commit
f46903b4b2
|
@ -258,9 +258,10 @@ ENDMACRO(QT4_ADD_DBUS_INTERFACE)
|
||||||
MACRO(QT4_ADD_DBUS_INTERFACES _sources)
|
MACRO(QT4_ADD_DBUS_INTERFACES _sources)
|
||||||
FOREACH (_current_FILE ${ARGN})
|
FOREACH (_current_FILE ${ARGN})
|
||||||
GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
|
GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
|
||||||
|
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME)
|
||||||
# get the part before the ".xml" suffix
|
# get the part before the ".xml" suffix
|
||||||
STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE})
|
|
||||||
STRING(TOLOWER ${_basename} _basename)
|
STRING(TOLOWER ${_basename} _basename)
|
||||||
|
STRING(REGEX REPLACE "(.*\\.)?([^\\.]+)\\.xml" "\\2" _basename ${_basename})
|
||||||
QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
|
QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
|
||||||
ENDFOREACH (_current_FILE)
|
ENDFOREACH (_current_FILE)
|
||||||
ENDMACRO(QT4_ADD_DBUS_INTERFACES)
|
ENDMACRO(QT4_ADD_DBUS_INTERFACES)
|
||||||
|
|
Loading…
Reference in New Issue