]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Update am2cmake.py to take into account latest changes in GUI module (MOC_FILES_HXX)
authorvsr <vsr@opencascade.com>
Sun, 6 Nov 2011 09:04:19 +0000 (09:04 +0000)
committervsr <vsr@opencascade.com>
Sun, 6 Nov 2011 09:04:19 +0000 (09:04 +0000)
salome_adm/cmake_files/am2cmake.py

index ce853b7c99e4bdfd6d65910dc380483854c39c5d..1f996da8d2ec98d349ca06629e42d9279d987f5a 100644 (file)
@@ -1426,11 +1426,7 @@ class CMakeFile(object):
             newlines.append('''
             FOREACH(output ${MOC_FILES})
             ''')
-            if self.module in ["jobmanager", "yacs"] or \
-               (self.module == "gui" and \
-                (self.root[-len('GuiHelpers'):] == 'GuiHelpers' or \
-                 self.root[-len('TreeData'):] == 'TreeData' or \
-                 self.root[-len('TreeData/Test'):] == 'TreeData/Test')):
+            if self.module in ["jobmanager", "yacs"]:
                 newlines.append('''
                 STRING(REGEX REPLACE _moc.cxx .hxx input ${output})
                 ''')
@@ -1451,6 +1447,28 @@ class CMakeFile(object):
             ''')
             pass
         
+        # --
+        # --
+        key = "MOC_FILES_HXX"
+        if self.__thedict__.has_key(key):
+            newlines.append('''
+            FOREACH(output ${MOC_FILES_HXX})
+            ''')
+            newlines.append('''
+            STRING(REGEX REPLACE _moc.cxx .hxx input ${output})
+            ''')
+            newlines.append('''
+            SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
+            SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output})
+            ADD_CUSTOM_COMMAND(
+            OUTPUT ${output}
+            COMMAND ${QT_MOC_EXECUTABLE} ${MOC_FLAGS} ${input} -o ${output}
+            MAIN_DEPENDENCY ${input}
+            )
+            ENDFOREACH(output ${MOC_FILES_HXX})
+            ''')
+            pass
+        
         # --
         # --
         key = "UIC_FILES"