Salome HOME
Adaptation of HYDRO to standard procedure of building SALOME modules on Windows platform
[modules/hydro.git] / src / HYDROData / CMakeLists.txt
1 include(../../CMake/Common.cmake)
2
3 set(PROJECT_HEADERS 
4     HYDROData.h
5     HYDROData_Application.h
6     HYDROData_Bathymetry.h
7     HYDROData_Document.h
8     HYDROData_Image.h
9     HYDROData_Iterator.h
10     HYDROData_Object.h
11     HYDROData_Polyline.h
12     HYDROData_VisualState.h
13     HYDROData_Tool.h
14 )
15
16 set(PROJECT_SOURCES 
17     HYDROData_Application.cxx
18     HYDROData_Bathymetry.cxx
19     HYDROData_Document.cxx
20     HYDROData_Image.cxx
21     HYDROData_Iterator.cxx
22     HYDROData_Object.cxx
23     HYDROData_Polyline.cxx
24     HYDROData_VisualState.cxx
25     HYDROData_Tool.cxx
26 )
27
28 add_definitions(
29   -DHYDRODATA_EXPORTS
30   ${CAS_DEFINITIONS}
31   ${QT_DEFINITIONS}
32 )
33
34 include_directories(
35   ${CAS_INCLUDE_DIRS}
36   ${QT_INCLUDES}
37   ${CMAKE_CURRENT_SOURCE_DIR}
38 )
39
40 add_library(HYDROData SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
41 target_link_libraries(HYDROData ${CAS_OCAF} ${QT_LIBRARIES})
42
43 set(PROJECT_LIBRARIES HYDROData)
44
45 # tests
46 if(CPPUNIT_IS_OK)
47
48   set(TEST_HEADERS 
49     test_HYDROData_Document.h
50     test_HYDROData_Object.h
51     test_HYDROData_Iterator.h
52     test_HYDROData_Image.h
53     test_HYDROData_Polyline.h
54   )
55
56   set(TEST_SOURCES 
57     test_HYDROData_Main.cxx
58     test_HYDROData_Document.cxx
59     test_HYDROData_Object.cxx
60     test_HYDROData_Iterator.cxx
61     test_HYDROData_Image.cxx
62     test_HYDROData_Polyline.cxx
63   )
64   
65   set(TEST_EXE test_HYDROData)
66   include(../../CMake/CPPUnitTests.cmake)
67   target_link_libraries(test_HYDROData ${CAS_OCAF} ${QT_LIBRARIES} ${CPPUNIT_LIBS} HYDROData)
68   
69 endif(CPPUNIT_IS_OK)
70
71 include(../../CMake/CommonInstall.cmake)