]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDRO_tests/CMakeLists.txt
Salome HOME
Fix merge errors.
[modules/hydro.git] / src / HYDRO_tests / CMakeLists.txt
1 ADD_SUBDIRECTORY(reference_data)
2
3 include(../../CMake/Common.cmake)
4 include(ExternalFiles.cmake)
5
6 set(PROJECT_HEADERS
7   test_HYDROData_Bathymetry.h
8   test_HYDROData_Channel.h
9   test_HYDROData_Document.h
10   test_HYDROData_Entity.h
11   test_HYDROData_Image.h
12   test_HYDROData_Iterator.h
13   test_HYDROData_LandCoverMap.h
14   test_HYDROData_OperationsFactory.h
15   test_HYDROData_PolylineXY.h
16   test_HYDROData_Profile.h
17   test_HYDROData_ShapeFile.h
18   test_HYDROData_StricklerTable.h
19   test_HYDROGUI_ListModel.h
20   test_HYDROGUI_Shape.h
21   test_HYDROGUI_LandCoverMapDlg.h
22   test_HYDROData_CalcCase.h
23   test_HYDROData_Stream.h
24
25   test_Dependencies.h
26   test_HYDROData_DTM.h
27
28   TestShape.h
29   TestViewer.h
30   TestLib_Listener.h
31   TestLib_Runner.h
32 )
33
34 set(PROJECT_SOURCES
35   test_HYDROData_Bathymetry.cxx
36   test_HYDROData_Channel.cxx
37   test_HYDROData_Document.cxx
38   test_HYDROData_Entity.cxx
39   test_HYDROData_Image.cxx
40   test_HYDROData_Iterator.cxx
41   test_HYDROData_LandCoverMap.cxx
42   test_HYDROData_Main.cxx
43   test_HYDROData_OperationsFactory.cxx
44   test_HYDROData_PolylineXY.cxx
45   test_HYDROData_Profile.cxx
46   test_HYDROData_ShapeFile.cxx
47   test_HYDROData_StricklerTable.cxx
48   test_HYDROData_DTM.cxx
49   test_HYDROGUI_ListModel.cxx
50   test_HYDROGUI_Shape.cxx
51   test_HYDROGUI_LandCoverMapDlg.cxx
52   test_HYDROData_CalcCase.cxx
53   test_HYDROData_Stream.cxx
54   test_Dependencies.cxx
55
56   TestShape.cxx
57   TestViewer.cxx
58   TestLib_Listener.cxx
59   TestLib_Runner.cxx
60 )
61
62 add_definitions( -DLIGHT_MODE -DHYDRODATA_STATIC -DHYDROGUI_STATIC )
63
64 IF( ${WIN32} )
65   add_definitions( -DWNT -D__WIN32__ -D__x86__ -D_WIN64 -D_WIN32_WINNT=0x0400 -D__NT__ -D__OSVERSION__=4 )
66 ENDIF()
67
68 SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT}/include )
69 SET( CAS_INCLUDES $ENV{CASROOT}/inc )
70 SET( QT_INCLUDES $ENV{QT5_ROOT_DIR}/include $ENV{QT5_ROOT_DIR}/include/QtCore $ENV{QT5_ROOT_DIR}/include/QtGui $ENV{QT5_ROOT_DIR}/include/QtTest )
71 SET( KERNEL_INCLUDES $ENV{KERNEL_ROOT_DIR}/include/salome )
72 SET( GUI_INCLUDES $ENV{GUI_ROOT_DIR}/include/salome )
73 SET( GEOM_INCLUDES $ENV{GEOM_ROOT_DIR}/include/salome )
74
75 IF( ${WIN32} )
76   link_directories( $ENV{CASROOT}/win32/libd )
77 ELSE()
78   link_directories( $ENV{CASROOT}/lib )
79 ENDIF()
80 SET( CAS_LIBRARIES TKernel TKLCAF TKCAF TKCDF TKMath TKG2d TKG3d TKBRep TKGeomBase TKTopAlgo TKGeomAlgo TKBool TKShHealing TKXSBase TKOffset TKHLR TKBO TKV3d TKService TKMesh )
81
82 link_directories( $ENV{QT5_ROOT_DIR}/lib )
83 IF( ${WIN32} )
84   SET( QT_LIBRARIES QtCored4 QtGuid4 QtTestd4 )
85 ELSE()
86   SET( QT_LIBRARIES QtCore QtGui QtTest )
87 ENDIF()
88
89 link_directories( $ENV{CPPUNIT_ROOT}/lib )
90 IF( ${WIN32} )
91   SET( CPPUNIT_LIBRARIES cppunitd )
92 ELSE()
93   SET( CPPUNIT_LIBRARIES cppunit )
94 ENDIF()
95
96 link_directories( $ENV{KERNEL_ROOT_DIR}/lib/salome $ENV{GUI_ROOT_DIR}/lib/salome $ENV{GEOM_ROOT_DIR}/lib/salome )
97 SET( GUI_LIBRARIES ImageComposer qtx suit LightApp CAM OCCViewer )
98 SET( GEOM_LIBRARIES CurveCreator GEOMUtils GEOMUtils )
99
100 include_directories(
101   ${CAS_INCLUDES}
102   ${QT_INCLUDES}
103   ${CPPUNIT_INCLUDES}
104   ${KERNEL_INCLUDES}
105   ${GUI_INCLUDES}
106   ${GEOM_INCLUDES}
107   ${CMAKE_CURRENT_SOURCE_DIR}/../HYDROData
108   ${CMAKE_CURRENT_SOURCE_DIR}/../HYDROGUI
109   ${CMAKE_CURRENT_SOURCE_DIR}/../shapelib
110 )
111
112 source_group( "External files" FILES ${EXTERNAL_FILES} )
113
114 add_executable( HYDROData_tests ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${EXTERNAL_FILES} ${PROJECT_MOC_HEADERS} )
115 target_link_libraries( HYDROData_tests ${GUI_LIBRARIES} ${GEOM_LIBRARIES} ${CAS_LIBRARIES} ${QT_LIBRARIES} ${CPPUNIT_LIBRARIES} shapelib HYDROData )
116
117 INSTALL(TARGETS HYDROData_tests EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})