+ADD_SUBDIRECTORY(reference_data)
+
+include(../../CMake/Common.cmake)
include(ExternalFiles.cmake)
+set (CMAKE_POSITION_INDEPENDENT_CODE ON)
+
set(PROJECT_HEADERS
- operators.h
test_HYDROData_Bathymetry.h
+ test_HYDROData_Channel.h
test_HYDROData_Document.h
test_HYDROData_Entity.h
test_HYDROData_Image.h
test_HYDROData_Iterator.h
+ test_HYDROData_LandCoverMap.h
test_HYDROData_OperationsFactory.h
test_HYDROData_PolylineXY.h
test_HYDROData_Profile.h
+ test_HYDROData_ShapeFile.h
test_HYDROData_StricklerTable.h
test_HYDROGUI_ListModel.h
+ test_HYDROGUI_Shape.h
+ test_HYDROGUI_LandCoverMapDlg.h
+ test_HYDROData_CalcCase.h
+ test_HYDROData_Stream.h
+ test_HYDROData_Tool.h
+ test_HYDROGUI_BathymetryPrs.h
+
+ test_Dependencies.h
+ test_HYDROData_DTM.h
+ test_HYDROData_BoundaryPolygons.h
+ test_GraphicsView.h
+ test_Overview.h
+ TestShape.h
TestViewer.h
+ TestLib_Listener.h
+ TestLib_Runner.h
)
-set(PROJECT_SOURCES
+set(PROJECT_SOURCES
test_HYDROData_Bathymetry.cxx
+ test_HYDROData_Channel.cxx
test_HYDROData_Document.cxx
test_HYDROData_Entity.cxx
test_HYDROData_Image.cxx
test_HYDROData_Iterator.cxx
+ test_HYDROData_LandCoverMap.cxx
test_HYDROData_Main.cxx
test_HYDROData_OperationsFactory.cxx
test_HYDROData_PolylineXY.cxx
test_HYDROData_Profile.cxx
+ test_HYDROData_ShapeFile.cxx
test_HYDROData_StricklerTable.cxx
+ test_HYDROData_DTM.cxx
+ test_HYDROData_BoundaryPolygons.cxx
test_HYDROGUI_ListModel.cxx
-
- ${EXTERNAL_FILES}
-
+ test_HYDROGUI_Shape.cxx
+ test_HYDROGUI_LandCoverMapDlg.cxx
+ test_HYDROData_CalcCase.cxx
+ test_HYDROData_Stream.cxx
+ test_Dependencies.cxx
+ test_HYDROData_Tool.cxx
+ test_GraphicsView.cxx
+ test_Overview.cxx
+ test_HYDROGUI_ProfilesDlg.cxx
+ test_HYDROGUI_BathymetryPrs.cxx
+
+ TestShape.cxx
TestViewer.cxx
+ TestLib_Listener.cxx
+ TestLib_Runner.cxx
)
-add_definitions(
- -DLIGHT_MODE -DHYDRODATA_STATIC -DHYDROGUI_STATIC
-)
+add_definitions( -DLIGHT_MODE -DHYDRODATA_STATIC -DHYDROGUI_STATIC -DTEST_MODE -DQT_GUI_LIB -DQT_WIDGETS_LIB )
IF( ${WIN32} )
- add_definitions( -DWNT )
+ add_definitions( -DWNT -D__WIN32__ -D__x86__ -D_WIN64 -D_WIN32_WINNT=0x0400 -D__NT__ -D__OSVERSION__=4 )
ENDIF()
-SET( BOOST_INCLUDES $ENV{BOOST_ROOT_DIR}/include/boost-1_52 )
-SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT_DIR}/include )
-SET( QT_INCLUDES $ENV{QT_ROOT_DIR}/include $ENV{QT_ROOT_DIR}/include/QtCore $ENV{QT_ROOT_DIR}/include/QtGui )
+SET( CPPUNIT_INCLUDES $ENV{CPPUNIT_ROOT}/include )
+SET( CAS_INCLUDES $ENV{CASROOT}/inc )
+SET( QT_INCLUDES $ENV{QTDIR}/include $ENV{QT_ROOT_DIR}/include $ENV{QT_ROOT_DIR}/include/QtCore $ENV{QT_ROOT_DIR}/include/QtGui $ENV{QT_ROOT_DIR}/include/QtTest )
+SET( KERNEL_INCLUDES $ENV{KERNEL_ROOT_DIR}/include/salome )
SET( GUI_INCLUDES $ENV{GUI_ROOT_DIR}/include/salome )
+SET( GEOM_INCLUDES $ENV{GEOM_ROOT_DIR}/include/salome )
+SET( ECW_INCLUDES $ENV{ECWLIB_ROOT_DIR}/include )
+
+IF( ${WIN32} )
+ link_directories( $ENV{CASROOT}/win64/lib/vc10 $ENV{GL2PS_DIR}/lib )
+ELSE()
+ link_directories( $ENV{CASROOT}/lib $ENV{TBB_ROOT_DIR}/lib/intel64/gcc4.4 )
+ENDIF()
+SET( CAS_LIBRARIES TKernel TKLCAF TKCAF TKCDF TKMath TKG2d TKG3d TKBRep TKGeomBase TKTopAlgo TKGeomAlgo TKBool TKShHealing TKXSBase TKOffset TKHLR TKBO TKV3d TKService TKMesh gl2ps )
+
+link_directories( $ENV{QT_ROOT_DIR}/lib $ENV{QTDIR}/lib )
+IF( ${WIN32} )
+ SET( QT_LIBRARIES Qt5Cored Qt5Guid Qt5Testd )
+ELSE()
+ SET( QT_LIBRARIES Qt5Core Qt5Gui Qt5Test )
+ENDIF()
+
+
+link_directories( $ENV{CPPUNIT_ROOT}/lib )
+IF( ${WIN32} )
+ IF( CMAKE_BUILD_TYPE MATCHES Debug )
+ SET( CPPUNIT_LIBRARIES cppunitd )
+ ELSE()
+ SET( CPPUNIT_LIBRARIES cppunit )
+ ENDIF()
+ELSE()
+ SET( CPPUNIT_LIBRARIES cppunit )
+ENDIF()
-link_directories( $ENV{CAS_ROOT_DIR}/win32/libd ) #TODO: more correct for release, linux etc
-SET( CAS_LIBRARIES TKernel TKLCAF TKCAF TKCDF TKMath TKG2d TKG3d TKBRep TKGeomBase TKTopAlgo TKGeomAlgo TKBool TKShHealing TKXSBase TKOffset TKHLR TKBO TKV3d )
+link_directories( $ENV{KERNEL_ROOT_DIR}/lib/salome $ENV{GUI_ROOT_DIR}/lib/salome $ENV{GEOM_ROOT_DIR}/lib/salome )
-link_directories( $ENV{QT_ROOT_DIR}/lib )
-SET( QT_LIBRARIES QtCored4 QtGuid4 )
+SET( GUI_LIBRARIES ImageComposer qtx suit CAM OCCViewer GraphicsView )
+# Please do not link with LightApp since in the full SALOME it is linked with CORBA (omniORB)
-link_directories( $ENV{CPPUNIT_ROOT_DIR}/lib )
-SET( CPPUNIT_LIBRARIES cppunitd )
+SET( GEOM_LIBRARIES CurveCreator GEOMUtils )
-link_directories( $ENV{GUI_ROOT_DIR}/lib/salome )
-SET( GUI_LIBRARIES ImageComposer Qtx SUIT LightApp CAM OCCViewer )
+link_directories( $ENV{ECWLIB_ROOT_DIR}/lib )
+IF( ${WIN32} )
+ SET( ECW_LIBRARIES libecwj2 )
+ELSE()
+ SET( ECW_LIBRARIES ecwj2 )
+ENDIF()
include_directories(
- ${BOOST_INCLUDES}
- ${CAS_INCLUDE_DIRS}
+ ${CAS_INCLUDES}
${QT_INCLUDES}
${CPPUNIT_INCLUDES}
+ ${KERNEL_INCLUDES}
${GUI_INCLUDES}
- ${CMAKE_CURRENT_SOURCE_DIR}
+ ${GEOM_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}/../HYDROData
${CMAKE_CURRENT_SOURCE_DIR}/../HYDROGUI
${CMAKE_CURRENT_SOURCE_DIR}/../shapelib
+ ${ECW_INCLUDES}
)
-add_executable( HYDROData_tests ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-target_link_libraries( HYDROData_tests ${GUI_LIBRARIES} ${CAS_LIBRARIES} ${QT_LIBRARIES} ${CPPUNIT_LIBRARIES} shapelib )
+source_group( "External files" FILES ${EXTERNAL_FILES} )
-IF( ${WIN32} )
- add_custom_command( TARGET HYDROData_tests POST_BUILD COMMAND $(TargetPath) COMMENT "Running tests" )
-ENDIF()
+add_executable( HYDROData_tests ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${EXTERNAL_FILES} ${PROJECT_MOC_HEADERS} )
+set_target_properties( HYDROData_tests PROPERTIES LINK_INTERFACE_LIBRARIES "" )
+target_link_libraries( HYDROData_tests ${GUI_LIBRARIES} ${GEOM_LIBRARIES} ${CAS_LIBRARIES} ${QT_LIBRARIES} ${CPPUNIT_LIBRARIES} shapelib ${ECW_LIBRARIES} )
+
+INSTALL(TARGETS HYDROData_tests EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})