#
# Author: Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+####################################################################
+#
+# _PYQT4_WRAP_GET_UNIQUE_TARGET_NAME: internal function
+#
+# Used to generate unique custom target name for usage in
+# PYQT4_WRAP_UIC macro.
+#
+# USAGE: _PYQT4_WRAP_GET_UNIQUE_TARGET_NAME(prefix unique_name)
+#
+# ARGUMENTS:
+# prefix [in] prefix for the name
+# unique_name [out] unique name generated by function
+#
+####################################################################
+FUNCTION(_PYQT4_WRAP_GET_UNIQUE_TARGET_NAME name unique_name)
+ SET(_propertyName "_PYQT4_WRAP_UNIQUE_COUNTER_${name}")
+ GET_PROPERTY(_currentCounter GLOBAL PROPERTY "${_propertyName}")
+ IF(NOT _currentCounter)
+ SET(_currentCounter 1)
+ ENDIF()
+ SET(${unique_name} "${name}_${_currentCounter}" PARENT_SCOPE)
+ MATH(EXPR _currentCounter "${_currentCounter} + 1")
+ SET_PROPERTY(GLOBAL PROPERTY ${_propertyName} ${_currentCounter} )
+ENDFUNCTION()
+
####################################################################
#
# PYQT4_WRAP_UIC macro
)
SET(${outfiles} ${${outfiles}} ${_output})
ENDFOREACH()
- ADD_CUSTOM_TARGET(BUILD_UI_PY_FILES ALL DEPENDS ${${outfiles}})
+ _PYQT4_WRAP_GET_UNIQUE_TARGET_NAME(BUILD_UI_PY_FILES _uniqueTargetName)
+ ADD_CUSTOM_TARGET(${_uniqueTargetName} ALL DEPENDS ${${outfiles}})
ENDMACRO(PYQT4_WRAP_UIC)
####################################################################