[cmake-developers] [CMake 0011518]: Can't use absolute path for Qt DBus interface

Mantis Bug Tracker mantis at public.kitware.com
Thu Nov 25 07:22:42 EST 2010


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11518 
====================================================================== 
Reported By:                Stephen Kelly
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11518
Category:                   CMake
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2010-11-25 07:22 EST
Last Modified:              2010-11-25 07:22 EST
====================================================================== 
Summary:                    Can't use absolute path for Qt DBus interface
Description: 
I've just hacked my FindQt like this:

@@ -261,7 +261,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)

Something similar should probably go into CMake.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-11-25 07:22 Stephen Kelly  New Issue                                    
======================================================================




More information about the cmake-developers mailing list