--- /dev/null
+include_directories(
+ ${CPPUNIT_INCLUDE_DIRS}
+)
+add_definitions(${CPPUNIT_DEFINITIONS})
+
+add_executable(${TEST_EXE} ${TEST_HEADERS} ${TEST_SOURCES})
+
+get_target_property(MyUnitTestTarget ${TEST_EXE} LOCATION)
+# replace $(OutDir) in this path by "Debug" or "Release" because it is not recognized by CTest later
+STRING(REGEX REPLACE "\\$\\(OutDir\\)" "${CMAKE_BUILD_TYPE}" MyUnitTestTarget_upd ${MyUnitTestTarget})
+enable_testing()
+
+add_test(${TEST_EXE} ${MyUnitTestTarget_upd})
+
\ No newline at end of file
--- /dev/null
+install(TARGETS ${PROJECT_LIBRARIES} RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
+install(FILES ${PROJECT_HEADERS} DESTINATION include)
--- /dev/null
+cmake_minimum_required (VERSION 2.6)
+
+project (HYDRO)
+
+SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
+IF(EXISTS ${KERNEL_ROOT_DIR})
+ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake)
+ELSE(EXISTS ${KERNEL_ROOT_DIR})
+ MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
+ENDIF(EXISTS ${KERNEL_ROOT_DIR})
+
+SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
+IF(EXISTS ${GUI_ROOT_DIR})
+ INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake)
+ELSE(EXISTS ${GUI_ROOT_DIR})
+ MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
+ENDIF(EXISTS ${GUI_ROOT_DIR})
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KERNEL_ROOT_DIR}/salome_adm/cmake_files ${GUI_ROOT_DIR}/adm_local/cmake_files)
+find_package(SalomeQT4)
+find_package(SalomeCAS)
+find_package(SalomeCPPUNIT)
+
+add_subdirectory (src/HYDROData)
+
+enable_testing()
--- /dev/null
+include(../../CMake/Common.cmake)
+
+set(PROJECT_HEADERS
+ HYDROData.h
+ HYDROData_Application.h
+ HYDROData_Document.h
+ HYDROData_Iterator.h
+ HYDROData_Object.h
+ HYDROData_Image.h
+)
+
+set(PROJECT_SOURCES
+ HYDROData_Application.cxx
+ HYDROData_Document.cxx
+ HYDROData_Iterator.cxx
+ HYDROData_Object.cxx
+ HYDROData_Image.cxx
+)
+
+add_definitions(
+ -DHYDRODATA_EXPORTS
+ ${CAS_DEFINITIONS}
+ ${QT_DEFINITIONS}
+)
+
+include_directories(
+ ${CAS_INCLUDE_DIRS}
+ ${QT_INCLUDES}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_library(HYDROData SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(HYDROData ${CAS_OCAF})
+
+set(PROJECT_LIBRARIES HYDROData)
+
+# tests
+if(CPPUNIT_IS_OK)
+
+ set(TEST_HEADERS
+ test_HYDROData_Document.h
+ test_HYDROData_Object.h
+ test_HYDROData_Iterator.h
+ test_HYDROData_Image.h
+ )
+
+ set(TEST_SOURCES
+ test_HYDROData_Main.cxx
+ test_HYDROData_Document.cxx
+ test_HYDROData_Object.cxx
+ test_HYDROData_Iterator.cxx
+ test_HYDROData_Image.cxx
+ )
+
+ set(TEST_EXE test_HYDROData)
+ include(../../CMake/CPPUnitTests.cmake)
+ target_link_libraries(test_HYDROData ${CAS_OCAF} ${QT_LIBRARIES} ${CPPUNIT_LIBS} HYDROData)
+
+endif(CPPUNIT_IS_OK)
+
+include(../../CMake/CommonInstall.cmake)