From 114e370ebee43ed67ca0dd02987b58675fa50477 Mon Sep 17 00:00:00 2001 From: vsr Date: Sun, 6 Nov 2011 09:04:19 +0000 Subject: [PATCH] Update am2cmake.py to take into account latest changes in GUI module (MOC_FILES_HXX) --- salome_adm/cmake_files/am2cmake.py | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index ce853b7c9..1f996da8d 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -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" -- 2.39.2