-ADD_CUSTOM_TARGET( HYDROData.py DEPENDS HYDROData.sip COMMAND ../../../HYDRO_SRC/src/HYDROPy/configure.py )
+include(../../CMake/UsePyQt4EXT.cmake)
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+ ${CAS_INCLUDE_DIRS}
+ ${QT_INCLUDES}
+ ${SIP_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}/src/HYDROData
+)
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+ ${QT_DEFINITIONS}
+ ${CAS_DEFINITIONS}
+ ${PYTHON_DEFINITIONS}
+)
+
+# libraries to link to
+SET(_link_LIBRARIES
+ ${PYTHON_LIBRARIES}
+ HYDROData
+)
+
+# --- resources ---
+
+# sip files / to be processed by sip
+
+# TODO: fix the PYQT4_WRAP_SIP and uncomment
+# SET(_sip_files
+# HYDROData.sip
+# HYDROData_Entity.sip
+# HYDROData_Object.sip
+# HYDROData_ArtificialObject.sip
+# HYDROData_NaturalObject.sip
+# HYDROData_Image.sip
+# HYDROData_Polyline.sip
+# HYDROData_Bathymetry.sip
+# HYDROData_ImmersibleZone.sip
+# HYDROData_Zone.sip
+# HYDROData_Region.sip
+# HYDROData_CalculationCase.sip
+# HYDROData_Document.sip
+# )
+
+# workaround while PYQT4_WRAP_SIP is not corrected
+SET(_sip_files
+ HYDROData.sip
+)
+
+SET(_sip_files2
+ HYDROData_Entity.sip
+ HYDROData_Object.sip
+ HYDROData_IPolyline.sip
+ HYDROData_ProfileUZ.sip
+ HYDROData_PolylineXY.sip
+ HYDROData_ArtificialObject.sip
+ HYDROData_NaturalObject.sip
+ HYDROData_Image.sip
+ HYDROData_Bathymetry.sip
+ HYDROData_ImmersibleZone.sip
+ HYDROData_Zone.sip
+ HYDROData_Region.sip
+ HYDROData_CalculationCase.sip
+ HYDROData_Document.sip
+)
+
+# --- sources ---
+
+# sources / sip wrappings
+PYQT4_WRAP_SIP_EXT(_sip_SOURCES ${_sip_files})
+
+# sources / to compile
+SET(HYDROPy_SOURCES ${_sip_SOURCES} ${_sip_files2})
+
+# --- rules ---
+
+ADD_LIBRARY(HYDROPy ${HYDROPy_SOURCES})
+TARGET_LINK_LIBRARIES(HYDROPy ${_link_LIBRARIES})
+INSTALL(TARGETS HYDROPy EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+IF(WIN32)
+ SET_TARGET_PROPERTIES(HYDROPy PROPERTIES SUFFIX ".pyd" DEBUG_OUTPUT_NAME HYDROPy_d RELEASE_OUTPUT_NAME HYDROPy)
+ELSE()
+ SET_TARGET_PROPERTIES(HYDROPy PROPERTIES PREFIX "")
+ENDIF()