Merge topic 'bug-11518-dbus-macro'

d640d54 allow absolute paths for dbus interface.
This commit is contained in:
Brad King 2010-12-28 15:26:37 -05:00 committed by CMake Topic Stage
commit 93460cc1d5
1 changed files with 9 additions and 1 deletions

View File

@ -254,7 +254,15 @@ MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options
GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
IF (_customName)
SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
if (IS_ABSOLUTE ${_customName})
get_filename_component(_containingDir ${_customName} PATH)
if (NOT EXISTS ${_containingDir})
file(MAKE_DIRECTORY "${_containingDir}")
endif()
SET(_target ${_customName})
else()
SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
endif()
ELSE (_customName)
SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
ENDIF (_customName)