Browse Source

COMP: ctkMacroWrapPythonQt - Make sure variable moc_flags is cleared

Jean-Christophe Fillion-Robin 15 years ago
parent
commit
d7ceb4bb35
1 changed files with 7 additions and 4 deletions
  1. 7 4
      CMake/ctkMacroWrapPythonQt.cmake

+ 7 - 4
CMake/ctkMacroWrapPythonQt.cmake

@@ -263,16 +263,19 @@ MACRO(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
     COMMENT "PythonQt ${wrap_type} Wrapping - Generating ${wrapper_init_cpp_filename}"
     VERBATIM
     )
-    
+  
+  # Clear variable
+  SET(moc_flags)
+  
+  # Grab moc flags
+  QT4_GET_MOC_FLAGS(moc_flags)
+  
   # Prepare custom_command argument
   SET(moc_flags_arg)
   FOREACH(flag ${moc_flags})
     SET(moc_flags_arg "${moc_flags_arg}^^${flag}")
   ENDFOREACH()
   
-  # Use Moc to process the wrapper headers
-  QT4_GET_MOC_FLAGS(moc_flags)
-  
   SET(wrapper_master_moc_filename moc_${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET}_all.cpp)
   SET(wrapper_master_moc_file ${CMAKE_CURRENT_BINARY_DIR}/${wrap_int_dir}${wrapper_master_moc_filename})