From a47eb7ba7586e0802310b3712d674654cae1b194 Mon Sep 17 00:00:00 2001 From: asl Date: Wed, 14 Oct 2015 14:06:09 +0300 Subject: [PATCH] correct compilation on Linux --- src/HYDROData/HYDROData_Tool.cxx | 1 + src/HYDROData/HYDROData_Tool.h | 6 +++++- src/HYDRO_tests/CMakeLists.txt | 25 +++++++++++++++++++------ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/HYDROData/HYDROData_Tool.cxx b/src/HYDROData/HYDROData_Tool.cxx index 404e19aa..e9fef89f 100644 --- a/src/HYDROData/HYDROData_Tool.cxx +++ b/src/HYDROData/HYDROData_Tool.cxx @@ -38,6 +38,7 @@ #include #include #include +#include static int aMaxNameId = std::numeric_limits::max(); diff --git a/src/HYDROData/HYDROData_Tool.h b/src/HYDROData/HYDROData_Tool.h index 761f9ec8..db72e3ff 100644 --- a/src/HYDROData/HYDROData_Tool.h +++ b/src/HYDROData/HYDROData_Tool.h @@ -31,7 +31,11 @@ class gp_XY; class QColor; class QFile; class TCollection_ExtendedString; -enum TopAbs_State; +#ifdef WIN32 + enum TopAbs_State; +#else + #include +#endif class TopoDS_Edge; class TopoDS_Face; class TopoDS_Shape; diff --git a/src/HYDRO_tests/CMakeLists.txt b/src/HYDRO_tests/CMakeLists.txt index bad92903..c7179cdd 100644 --- a/src/HYDRO_tests/CMakeLists.txt +++ b/src/HYDRO_tests/CMakeLists.txt @@ -46,20 +46,33 @@ 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( CAS_INCLUDES $ENV{CASROOT_DIR}/inc ) +SET( QT_INCLUDES $ENV{QT4_ROOT_DIR}/include $ENV{QT4_ROOT_DIR}/include/QtCore $ENV{QT4_ROOT_DIR}/include/QtGui ) SET( GUI_INCLUDES $ENV{GUI_ROOT_DIR}/include/salome ) -link_directories( $ENV{CAS_ROOT_DIR}/win32/libd ) #TODO: more correct for release, linux etc +IF( ${WIN32} ) + link_directories( $ENV{CAS_ROOT_DIR}/win32/libd ) +ELSE() + link_directories( $ENV{CAS_ROOT_DIR}/lib ) +ENDIF() SET( CAS_LIBRARIES TKernel TKLCAF TKCAF TKCDF TKMath TKG2d TKG3d TKBRep TKGeomBase TKTopAlgo TKGeomAlgo TKBool TKShHealing TKXSBase TKOffset TKHLR TKBO TKV3d ) -link_directories( $ENV{QT_ROOT_DIR}/lib ) -SET( QT_LIBRARIES QtCored4 QtGuid4 ) +link_directories( $ENV{QT4_ROOT_DIR}/lib ) +IF( ${WIN32} ) + SET( QT_LIBRARIES QtCored4 QtGuid4 ) +ELSE() + SET( QT_LIBRARIES QtCore QtGui ) +ENDIF() link_directories( $ENV{CPPUNIT_ROOT_DIR}/lib ) -SET( CPPUNIT_LIBRARIES cppunitd ) +IF( ${WIN32} ) + SET( CPPUNIT_LIBRARIES cppunitd ) +ELSE() + SET( CPPUNIT_LIBRARIES cppunit ) +ENDIF() link_directories( $ENV{GUI_ROOT_DIR}/lib/salome ) -SET( GUI_LIBRARIES ImageComposer Qtx SUIT LightApp CAM OCCViewer ) +SET( GUI_LIBRARIES ImageComposer qtx suit LightApp CAM OCCViewer ) include_directories( ${BOOST_INCLUDES} -- 2.39.2