From: ouv Date: Tue, 23 Jul 2013 15:01:37 +0000 (+0000) Subject: Compilation by CMake. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d32aa60b1d9a1a5c3a66baf5ad1f4ffa87283787;p=modules%2Fgui.git Compilation by CMake. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f302a1c2..399f5c4a3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,7 @@ OPTION(SALOME_USE_VTKVIEWER "Enable VTK visualization (Mandatory in classic conf OPTION(SALOME_USE_SALOMEOBJECT "Enable Salome Object (Mandatory in classic configurations)" ON) OPTION(SALOME_USE_OCCVIEWER "Enable OCC visualization (Mandatory in classic configurations)" ON) OPTION(SALOME_USE_GLVIEWER "Enable OpenGL visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_GRAPHICSVIEW "Enable GraphicsView visualization (Mandatory in classic configurations)" ON) OPTION(SALOME_USE_PLOT2DVIEWER "Enable Plot2D visualization (Mandatory in classic configurations)" ON) OPTION(SALOME_USE_PYCONSOLE "Enable Python GUI interface (Mandatory in classic configurations)" ON) OPTION(SALOME_USE_SUPERVGRAPHVIEWER "Enable Supervision visualization (Mandatory in classic configurations)" ON) diff --git a/adm_local/cmake_files/FindGUI.cmake b/adm_local/cmake_files/FindGUI.cmake index 83cd65bad..3147be3e8 100644 --- a/adm_local/cmake_files/FindGUI.cmake +++ b/adm_local/cmake_files/FindGUI.cmake @@ -25,6 +25,7 @@ FIND_LIBRARY(CASCatch CASCatch ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(DDS DDS ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(Event Event ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(GLViewer GLViewer ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(GraphicsView GraphicsView ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(LightApp LightApp ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(LogWindow LogWindow ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(ObjBrowser ObjBrowser ${GUI_ROOT_DIR}/lib/salome) diff --git a/adm_local/unix/config_files/CMakeLists.txt b/adm_local/unix/config_files/CMakeLists.txt index 3c257a37a..0b0d3eb20 100755 --- a/adm_local/unix/config_files/CMakeLists.txt +++ b/adm_local/unix/config_files/CMakeLists.txt @@ -23,6 +23,7 @@ SET(dist_admlocalm4_DATA check_disable_Corba.m4 check_GLViewer.m4 + check_GraphicsView.m4 check_GUI.m4 check_msg2qm.m4 check_OCCViewer.m4 diff --git a/adm_local/unix/config_files/check_GraphicsView.m4 b/adm_local/unix/config_files/check_GraphicsView.m4 index 9082b9424..004a291de 100644 --- a/adm_local/unix/config_files/check_GraphicsView.m4 +++ b/adm_local/unix/config_files/check_GraphicsView.m4 @@ -1,3 +1,25 @@ +dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +dnl +dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl + # # Check configure option --disable-graphicsView=[yes|no|DIR] taking into account that # DISABLE_GRAPHICSVIEW may be already set during build_configure, diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6d2b582a7..36b5dca36 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,6 +36,7 @@ SET(SUBDIRS_COMMON Prs Event OpenGLUtils + ImageComposer GUI_PY ) @@ -53,6 +54,13 @@ IF(SALOME_USE_GLVIEWER) SET(SUBDIRS_GLVIEWER GLViewer) ENDIF(SALOME_USE_GLVIEWER) +## +# GL viewer +## +IF(SALOME_USE_GRAPHICSVIEW) + SET(SUBDIRS_GRAPHICSVIEW GraphicsView) +ENDIF(SALOME_USE_GRAPHICSVIEW) + ## # VTK viewer ## @@ -148,6 +156,7 @@ SET(SUBDIRS ${SUBDIRS_OBJECT} ${SUBDIRS_VIEWERTOOLS} ${SUBDIRS_GLVIEWER} + ${SUBDIRS_GRAPHICSVIEW} ${SUBDIRS_VTKVIEWER} ${SUBDIRS_OCCVIEWER} ${SUBDIRS_PLOT2DVIEWER} diff --git a/src/GraphicsView/CMakeLists.txt b/src/GraphicsView/CMakeLists.txt new file mode 100755 index 000000000..ef4f1a460 --- /dev/null +++ b/src/GraphicsView/CMakeLists.txt @@ -0,0 +1,76 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDES} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../ImageComposer +) + +SET(COMMON_LIBS + ${QT_LIBRARIES} + suit + ImageComposer +) + +SET(GUI_HEADERS + GraphicsView_PrsPropDlg.h + GraphicsView_Scene.h + GraphicsView_Selector.h + GraphicsView_ViewFrame.h + GraphicsView_ViewManager.h + GraphicsView_ViewPort.h + GraphicsView_Viewer.h +) + +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(GraphicsView_SOURCES + GraphicsView_Object.cxx + GraphicsView_Scene.cxx + GraphicsView_Selector.cxx + GraphicsView_Viewer.cxx + GraphicsView_ViewFrame.cxx + GraphicsView_ViewManager.cxx + GraphicsView_ViewPort.cxx + GraphicsView_ViewTransformer.cxx + GraphicsView_PrsImage.cxx + GraphicsView_PrsImageFrame.cxx + GraphicsView_PrsPropDlg.cxx +) + +SET(GUITS_SOURCES + resources/GraphicsView_images.ts + resources/GraphicsView_msg_en.ts + resources/GraphicsView_msg_fr.ts +) + +ADD_LIBRARY(GraphicsView ${GraphicsView_SOURCES} ${GUI_HEADERS_MOC}) +TARGET_LINK_LIBRARIES(GraphicsView ${COMMON_LIBS}) +INSTALL(TARGETS GraphicsView DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/ImageComposer/CMakeLists.txt b/src/ImageComposer/CMakeLists.txt new file mode 100755 index 000000000..cda4cd568 --- /dev/null +++ b/src/ImageComposer/CMakeLists.txt @@ -0,0 +1,53 @@ +# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDES} +) + +SET(COMMON_LIBS + ${QT_LIBRARIES} +) + +SET(ImageComposer_SOURCES + ImageComposer_ColorMaskOperator.cxx + ImageComposer_CropOperator.cxx + ImageComposer_CutOperator.cxx + ImageComposer_FuseOperator.cxx + ImageComposer_Image.cxx + ImageComposer_Operator.cxx +) + +ADD_LIBRARY(ImageComposer ${ImageComposer_SOURCES}) +TARGET_LINK_LIBRARIES(ImageComposer ${COMMON_LIBS}) +INSTALL(TARGETS ImageComposer DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + ImageComposer.h + ImageComposer_ColorMaskOperator.h + ImageComposer_CropOperator.h + ImageComposer_CutOperator.h + ImageComposer_FuseOperator.h + ImageComposer_Image.h + ImageComposer_Operator.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/ImageComposer/ImageComposer_ColorMaskOperator.cxx b/src/ImageComposer/ImageComposer_ColorMaskOperator.cxx index 9a1110679..8f0f64b25 100644 --- a/src/ImageComposer/ImageComposer_ColorMaskOperator.cxx +++ b/src/ImageComposer/ImageComposer_ColorMaskOperator.cxx @@ -1,6 +1,6 @@ -#include -#include +#include "ImageComposer_ColorMaskOperator.h" +#include "ImageComposer_Image.h" #include #include #include diff --git a/src/ImageComposer/ImageComposer_ColorMaskOperator.h b/src/ImageComposer/ImageComposer_ColorMaskOperator.h index d3b6ec67c..fec0c9025 100644 --- a/src/ImageComposer/ImageComposer_ColorMaskOperator.h +++ b/src/ImageComposer/ImageComposer_ColorMaskOperator.h @@ -2,7 +2,7 @@ #ifndef IMAGE_COMPOSER_COLOR_MASK_OPERATOR_HEADER #define IMAGE_COMPOSER_COLOR_MASK_OPERATOR_HEADER -#include +#include "ImageComposer_Operator.h" #include /** diff --git a/src/ImageComposer/ImageComposer_CropOperator.cxx b/src/ImageComposer/ImageComposer_CropOperator.cxx index bacee5a7f..915205d27 100644 --- a/src/ImageComposer/ImageComposer_CropOperator.cxx +++ b/src/ImageComposer/ImageComposer_CropOperator.cxx @@ -1,6 +1,6 @@ -#include -#include +#include "ImageComposer_CropOperator.h" +#include "ImageComposer_Image.h" #include #include diff --git a/src/ImageComposer/ImageComposer_CropOperator.h b/src/ImageComposer/ImageComposer_CropOperator.h index d4a545990..1a2525efe 100644 --- a/src/ImageComposer/ImageComposer_CropOperator.h +++ b/src/ImageComposer/ImageComposer_CropOperator.h @@ -2,7 +2,7 @@ #ifndef IMAGE_COMPOSER_CROP_OPERATOR_HEADER #define IMAGE_COMPOSER_CROP_OPERATOR_HEADER -#include +#include "ImageComposer_Operator.h" #include #include diff --git a/src/ImageComposer/ImageComposer_CutOperator.cxx b/src/ImageComposer/ImageComposer_CutOperator.cxx index 07af47e45..3ecf2265e 100644 --- a/src/ImageComposer/ImageComposer_CutOperator.cxx +++ b/src/ImageComposer/ImageComposer_CutOperator.cxx @@ -1,6 +1,6 @@ -#include -#include +#include "ImageComposer_CutOperator.h" +#include "ImageComposer_Image.h" #include #include #include diff --git a/src/ImageComposer/ImageComposer_CutOperator.h b/src/ImageComposer/ImageComposer_CutOperator.h index fd12d3a2b..d85923c41 100644 --- a/src/ImageComposer/ImageComposer_CutOperator.h +++ b/src/ImageComposer/ImageComposer_CutOperator.h @@ -2,7 +2,7 @@ #ifndef IMAGE_COMPOSER_CUT_OPERATOR_HEADER #define IMAGE_COMPOSER_CUT_OPERATOR_HEADER -#include +#include "ImageComposer_Operator.h" #include /** diff --git a/src/ImageComposer/ImageComposer_FuseOperator.cxx b/src/ImageComposer/ImageComposer_FuseOperator.cxx index 9012f8af9..b68ad1741 100644 --- a/src/ImageComposer/ImageComposer_FuseOperator.cxx +++ b/src/ImageComposer/ImageComposer_FuseOperator.cxx @@ -1,6 +1,6 @@ -#include -#include +#include "ImageComposer_FuseOperator.h" +#include "ImageComposer_Image.h" #include #include #include diff --git a/src/ImageComposer/ImageComposer_FuseOperator.h b/src/ImageComposer/ImageComposer_FuseOperator.h index a6ad4c001..857ad54e9 100644 --- a/src/ImageComposer/ImageComposer_FuseOperator.h +++ b/src/ImageComposer/ImageComposer_FuseOperator.h @@ -2,7 +2,7 @@ #ifndef IMAGE_COMPOSER_FUSE_OPERATOR_HEADER #define IMAGE_COMPOSER_FUSE_OPERATOR_HEADER -#include +#include "ImageComposer_Operator.h" #include /** diff --git a/src/ImageComposer/ImageComposer_Image.cxx b/src/ImageComposer/ImageComposer_Image.cxx index 1d9ede6dc..a7b1a7e6f 100644 --- a/src/ImageComposer/ImageComposer_Image.cxx +++ b/src/ImageComposer/ImageComposer_Image.cxx @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include "ImageComposer_Image.h" +#include "ImageComposer_CropOperator.h" +#include "ImageComposer_CutOperator.h" +#include "ImageComposer_FuseOperator.h" #include QColor ImageComposer_Image::myDefaultBackground = TRANSPARENT; diff --git a/src/ImageComposer/ImageComposer_Image.h b/src/ImageComposer/ImageComposer_Image.h index 8b53dca94..fe3db0186 100644 --- a/src/ImageComposer/ImageComposer_Image.h +++ b/src/ImageComposer/ImageComposer_Image.h @@ -3,7 +3,7 @@ #define IMAGE_COMPOSER_IMAGE_HEADER #include -#include +#include "ImageComposer.h" class ImageComposer_Operator; diff --git a/src/ImageComposer/ImageComposer_Operator.cxx b/src/ImageComposer/ImageComposer_Operator.cxx index 2bf7f219c..7a9fde0ad 100644 --- a/src/ImageComposer/ImageComposer_Operator.cxx +++ b/src/ImageComposer/ImageComposer_Operator.cxx @@ -1,6 +1,6 @@ -#include -#include +#include "ImageComposer_Operator.h" +#include "ImageComposer_Image.h" #include #include diff --git a/src/ImageComposer/ImageComposer_Operator.h b/src/ImageComposer/ImageComposer_Operator.h index b54552ddb..a90b48536 100644 --- a/src/ImageComposer/ImageComposer_Operator.h +++ b/src/ImageComposer/ImageComposer_Operator.h @@ -2,7 +2,7 @@ #ifndef IMAGE_COMPOSER_OPERATOR_HEADER #define IMAGE_COMPOSER_OPERATOR_HEADER -#include +#include "ImageComposer.h" #include class QString; diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index 5cfebdd16..023d1b2bd 100755 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -200,6 +200,16 @@ ELSE(SALOME_USE_GLVIEWER) ADD_DEFINITIONS("-DDISABLE_GLVIEWER") ENDIF(SALOME_USE_GLVIEWER) +IF(SALOME_USE_GRAPHICSVIEW) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../GraphicsView) + SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_GVSelector.h) + SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_GVSelector.cxx) + SET(GUI_HEADERS ${GUI_HEADERS} LightApp_GVSelector.h) + SET(COMMON_LIBS ${COMMON_LIBS} GraphicsView) +ELSE(SALOME_USE_GRAPHICSVIEW) + ADD_DEFINITIONS("-DDISABLE_GRAPHICSVIEW") +ENDIF(SALOME_USE_GRAPHICSVIEW) + IF(SALOME_USE_PLOT2DVIEWER) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d) ADD_DEFINITIONS(${QWT_DEFINITIONS}) diff --git a/src/LightApp/LightApp_GVSelector.cxx b/src/LightApp/LightApp_GVSelector.cxx index 75ed0d1cc..8be3a7d0e 100644 --- a/src/LightApp/LightApp_GVSelector.cxx +++ b/src/LightApp/LightApp_GVSelector.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include +#include "LightApp_GVSelector.h" #include #include diff --git a/src/SalomeApp/CMakeLists.txt b/src/SalomeApp/CMakeLists.txt index 3f8042c08..3c09fb9c1 100755 --- a/src/SalomeApp/CMakeLists.txt +++ b/src/SalomeApp/CMakeLists.txt @@ -72,6 +72,7 @@ SET(COMMON_LIBS SalomePrs SPlot2d GLViewer + GraphicsView OCCViewer VTKViewer SalomeObject