From e42ca64ec38f0e96cdf7125a20a710c1c3d94a81 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 9 Mar 2006 06:56:31 +0000 Subject: [PATCH] Changes in Salome configuration scripts --- Makefile.in | 8 +- adm_local/unix/config_files/check_GLViewer.m4 | 25 ++ adm_local/unix/config_files/check_GUI.m4 | 53 +++ .../unix/config_files/check_OCCViewer.m4 | 25 ++ .../unix/config_files/check_Plot2dViewer.m4 | 25 ++ .../unix/config_files/check_PyConsole.m4 | 25 ++ .../unix/config_files/check_SalomeObject.m4 | 25 ++ .../config_files/check_SupervGraphViewer.m4 | 25 ++ .../unix/config_files/check_VTKViewer.m4 | 25 ++ .../unix/config_files/check_corba_in_GUI.m4 | 55 +++ .../unix/config_files/check_disable_Corba.m4 | 27 ++ adm_local/unix/config_files/check_msg2qm.m4 | 57 +++ adm_local/unix/config_files/check_opengl.m4 | 143 ++++++ adm_local/unix/config_files/check_pyqt.m4 | 307 +++++++++++++ adm_local/unix/config_files/check_qt.m4 | 175 ++++++++ adm_local/unix/config_files/check_qwt.m4 | 151 +++++++ adm_local/unix/config_files/check_sip.m4 | 168 +++++++ adm_local/unix/config_files/check_vtk.m4 | 148 ++++++ adm_local/unix/make_commence.in | 23 +- adm_local/unix/make_conclude.in | 421 ++++++++++++++++++ build_configure | 2 +- configure.in.base | 186 +++++++- src/LightApp/LightApp_Application.cxx | 209 +++++++-- src/LightApp/LightApp_Application.h | 39 +- src/LightApp/LightApp_DataOwner.cxx | 10 + src/LightApp/LightApp_DataOwner.h | 13 +- src/LightApp/LightApp_Displayer.cxx | 13 +- src/LightApp/LightApp_GLSelector.cxx | 27 +- src/LightApp/LightApp_GLSelector.h | 20 + src/LightApp/LightApp_Module.cxx | 97 +++- src/LightApp/LightApp_OBSelector.cxx | 4 + src/LightApp/LightApp_OCCSelector.cxx | 16 +- src/LightApp/LightApp_SelectionMgr.cxx | 50 ++- src/LightApp/LightApp_SelectionMgr.h | 23 +- src/LightApp/LightApp_ShowHideOp.cxx | 38 +- src/LightApp/LightApp_VTKSelector.cxx | 32 +- src/LightApp/LightApp_VTKSelector.h | 33 +- src/LightApp/Makefile.in | 113 ++++- src/Makefile.in | 45 +- src/OBJECT/Makefile.in | 6 +- src/OBJECT/SALOME_GLOwner.cxx | 40 -- src/OBJECT/SALOME_GLOwner.h | 45 -- src/SPlot2d/Makefile.in | 4 +- src/SUPERVGraph/Makefile.in | 2 +- 44 files changed, 2727 insertions(+), 251 deletions(-) create mode 100644 adm_local/unix/config_files/check_GLViewer.m4 create mode 100755 adm_local/unix/config_files/check_GUI.m4 create mode 100644 adm_local/unix/config_files/check_OCCViewer.m4 create mode 100644 adm_local/unix/config_files/check_Plot2dViewer.m4 create mode 100644 adm_local/unix/config_files/check_PyConsole.m4 create mode 100644 adm_local/unix/config_files/check_SalomeObject.m4 create mode 100644 adm_local/unix/config_files/check_SupervGraphViewer.m4 create mode 100644 adm_local/unix/config_files/check_VTKViewer.m4 create mode 100755 adm_local/unix/config_files/check_corba_in_GUI.m4 create mode 100644 adm_local/unix/config_files/check_disable_Corba.m4 create mode 100755 adm_local/unix/config_files/check_msg2qm.m4 create mode 100644 adm_local/unix/config_files/check_opengl.m4 create mode 100644 adm_local/unix/config_files/check_pyqt.m4 create mode 100644 adm_local/unix/config_files/check_qt.m4 create mode 100644 adm_local/unix/config_files/check_qwt.m4 create mode 100644 adm_local/unix/config_files/check_sip.m4 create mode 100644 adm_local/unix/config_files/check_vtk.m4 create mode 100644 adm_local/unix/make_conclude.in delete mode 100644 src/OBJECT/SALOME_GLOwner.cxx delete mode 100644 src/OBJECT/SALOME_GLOwner.h diff --git a/Makefile.in b/Makefile.in index 989c6a476..c1bc6bff4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,7 +14,13 @@ VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:@top_srcdir@/resources:./bin:@top @COMMENCE@ -SUBDIRS = idl src doc +SUBDIRS = src + +ifeq ($(GUI_DISABLE_CORBA),no) + SUBDIRS+= idl +endif + +SUBDIRS+= doc adm_local RESOURCES_FILES = \ back.xpm \ diff --git a/adm_local/unix/config_files/check_GLViewer.m4 b/adm_local/unix/config_files/check_GLViewer.m4 new file mode 100644 index 000000000..90a304173 --- /dev/null +++ b/adm_local/unix/config_files/check_GLViewer.m4 @@ -0,0 +1,25 @@ +# +# Check configure option --disable-glViewer=[yes|no|DIR] taking into account that +# DISABLE_GLVIEWER may be already set during build_configure, +# Set DISABLE_GLVIEWER to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([CHECK_GLVIEWER],[ + +AC_ARG_WITH(glViewer, + [ --disable-glViewer default=no ], + disable_glViewer="$withval",disable_glViewer="${DISABLE_GLVIEWER}") + +case $disable_glViewer in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(******* DISABLE GLViewer configuration *****) +# AC_MSG_RESULT(************************************************) + DISABLE_GLVIEWER="yes" + AC_SUBST(DISABLE_GLVIEWER) +esac + + +])dnl diff --git a/adm_local/unix/config_files/check_GUI.m4 b/adm_local/unix/config_files/check_GUI.m4 new file mode 100755 index 000000000..ad022e400 --- /dev/null +++ b/adm_local/unix/config_files/check_GUI.m4 @@ -0,0 +1,53 @@ +# Check availability of Salome binary distribution +# +# Author : Marc Tajchman (CEA, 2002) +#------------------------------------------------------------ + +AC_DEFUN([CHECK_SALOME_GUI],[ + +AC_CHECKING(for SalomeGUI) + +SalomeGUI_ok=no + +AC_ARG_WITH(gui, + --with-salome_gui=DIR root directory path of SALOME GUI installation, + SALOME_GUI_DIR="$withval",SALOME_GUI_DIR="") + +if test "x$SALOME_GUI_DIR" = "x" ; then + +# no --with-gui-dir option used + + if test "x$GUI_ROOT_DIR" != "x" ; then + + # SALOME_ROOT_DIR environment variable defined + SALOME_GUI_DIR=$GUI_ROOT_DIR + + else + + # search Salome binaries in PATH variable + AC_PATH_PROG(TEMP, libLightApp.so) + if test "x$TEMP" != "x" ; then + SALOME_BIN_DIR=`dirname $TEMP` + SALOME_GUI_DIR=`dirname $SALOME_BIN_DIR` + fi + + fi +# +fi + +if test -f ${SALOME_GUI_DIR}/lib/salome/libLightApp.so ; then + SalomeGUI_ok=yes + AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR}) + + if test "x$GUI_ROOT_DIR" == "x" ; then + GUI_ROOT_DIR=${SALOME_GUI_DIR} + fi + AC_SUBST(GUI_ROOT_DIR) +else + AC_MSG_WARN("Cannot find compiled SALOME GUI distribution") +fi + +AC_MSG_RESULT(for SALOME GUI: $SalomeGUI_ok) + +])dnl + diff --git a/adm_local/unix/config_files/check_OCCViewer.m4 b/adm_local/unix/config_files/check_OCCViewer.m4 new file mode 100644 index 000000000..cae33b971 --- /dev/null +++ b/adm_local/unix/config_files/check_OCCViewer.m4 @@ -0,0 +1,25 @@ +# +# Check configure option --disable-occViewer=[yes|no|DIR] taking into account that +# DISABLE_OCCVIEWER may be already set during build_configure, +# Set DISABLE_OCCVIEWER to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([CHECK_OCCVIEWER],[ + +AC_ARG_WITH(occViewer, + [ --disable-occViewer default=no ], + disable_occViewer="$withval",disable_occViewer="${DISABLE_OCCVIEWER}") + +case $disable_occViewer in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(***** DISABLE OCCViewer configuration ******) +# AC_MSG_RESULT(************************************************) + DISABLE_OCCVIEWER="yes" + AC_SUBST(DISABLE_OCCVIEWER) +esac + + +])dnl diff --git a/adm_local/unix/config_files/check_Plot2dViewer.m4 b/adm_local/unix/config_files/check_Plot2dViewer.m4 new file mode 100644 index 000000000..a8fb1ad85 --- /dev/null +++ b/adm_local/unix/config_files/check_Plot2dViewer.m4 @@ -0,0 +1,25 @@ +# +# Check configure option --disable-plot2dViewer=[yes|no|DIR] taking into account that +# DISABLE_PLOT2DVIEWER may be already set during build_configure, +# Set DISABLE_PLOT2DVIEWER to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([CHECK_PLOT2DVIEWER],[ + +AC_ARG_WITH(plot2dViewer, + [ --disable-plot2dViewer default=no ], + disable_plot2dViewer="$withval",disable_plot2dViewer="${DISABLE_PLOT2DVIEWER}") + +case $disable_plot2dViewer in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(*** DISABLE Plot2dViewer configuration *****) +# AC_MSG_RESULT(************************************************) + DISABLE_PLOT2DVIEWER="yes" + AC_SUBST(DISABLE_PLOT2DVIEWER) +esac + + +])dnl diff --git a/adm_local/unix/config_files/check_PyConsole.m4 b/adm_local/unix/config_files/check_PyConsole.m4 new file mode 100644 index 000000000..503646f84 --- /dev/null +++ b/adm_local/unix/config_files/check_PyConsole.m4 @@ -0,0 +1,25 @@ +# +# Check configure option --disable-pyConsole=[yes|no|DIR] taking into account that +# DISABLE_PYCONSOLE may be already set during build_configure, +# Set DISABLE_PYCONSOLE to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([CHECK_PYCONSOLE],[ + +AC_ARG_WITH(pyConsole, + [ --disable-pyConsole default=no ], + disable_pyConsole="$withval",disable_pyConsole="${DISABLE_PYCONSOLE}") + +case $disable_pyConsole in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(***** DISABLE PyConsole configuration ******) +# AC_MSG_RESULT(************************************************) + DISABLE_PYCONSOLE="yes" + AC_SUBST(DISABLE_PYCONSOLE) +esac + + +])dnl diff --git a/adm_local/unix/config_files/check_SalomeObject.m4 b/adm_local/unix/config_files/check_SalomeObject.m4 new file mode 100644 index 000000000..453dbd7ab --- /dev/null +++ b/adm_local/unix/config_files/check_SalomeObject.m4 @@ -0,0 +1,25 @@ +# +# Check configure option --disable-salomeObject=[yes|no|DIR] taking into account that +# DISABLE_SALOMEOBJECT may be already set during build_configure, +# Set DISABLE_SALOMEOBJECT to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([CHECK_SALOMEOBJECT],[ + +AC_ARG_WITH(salomeObject, + [ --disable-salomeObject default=no ], + disable_salomeObject="$withval",disable_salomeObject="${DISABLE_SALOMEOBJECT}") + +case $disable_salomeObject in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(*** DISABLE Salome object configuration ****) +# AC_MSG_RESULT(************************************************) + DISABLE_SALOMEOBJECT="yes" + AC_SUBST(DISABLE_SALOMEOBJECT) +esac + + +])dnl diff --git a/adm_local/unix/config_files/check_SupervGraphViewer.m4 b/adm_local/unix/config_files/check_SupervGraphViewer.m4 new file mode 100644 index 000000000..455f02136 --- /dev/null +++ b/adm_local/unix/config_files/check_SupervGraphViewer.m4 @@ -0,0 +1,25 @@ +# +# Check configure option --disable-supervGraphViewer=[yes|no|DIR] taking into account that +# DISABLE_SUPERVGRAPHVIEWER may be already set during build_configure, +# Set DISABLE_SUPERVGRAPHVIEWER to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([CHECK_SUPERVGRAPHVIEWER],[ + +AC_ARG_WITH(supervGraphViewer, + [ --disable-supervGraphViewer default=no ], + disable_supervGraphViewer="$withval",disable_supervGraphViewer="${DISABLE_SUPERVGRAPHVIEWER}") + +case $disable_supervGraphViewer in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(******* DISABLE SupervGraphViewer configuration ********) +# AC_MSG_RESULT(************************************************) + DISABLE_SUPERVGRAPHVIEWER="yes" + AC_SUBST(DISABLE_SUPERVGRAPHVIEWER) +esac + + +])dnl diff --git a/adm_local/unix/config_files/check_VTKViewer.m4 b/adm_local/unix/config_files/check_VTKViewer.m4 new file mode 100644 index 000000000..c2adb23b9 --- /dev/null +++ b/adm_local/unix/config_files/check_VTKViewer.m4 @@ -0,0 +1,25 @@ +# +# Check configure option --disable-vtkViewer=[yes|no|DIR] taking into account that +# DISABLE_VTKVIEWER may be already set during build_configure, +# Set DISABLE_VTKVIEWER to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([CHECK_VTKVIEWER],[ + +AC_ARG_WITH(vtkViewer, + [ --disable-vtkViewer default=no ], + disable_vtkViewer="$withval",disable_vtkViewer="${DISABLE_VTKVIEWER}") + +case $disable_vtkViewer in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(***** DISABLE VTK Viewer configuration *****) +# AC_MSG_RESULT(************************************************) + DISABLE_VTKVIEWER="yes" + AC_SUBST(DISABLE_VTKVIEWER) +esac + + +])dnl diff --git a/adm_local/unix/config_files/check_corba_in_GUI.m4 b/adm_local/unix/config_files/check_corba_in_GUI.m4 new file mode 100755 index 000000000..007dfc6c5 --- /dev/null +++ b/adm_local/unix/config_files/check_corba_in_GUI.m4 @@ -0,0 +1,55 @@ +# Check availability of full Salome binary distribution +# +# Author : Marc Tajchman (CEA, 2002) +#------------------------------------------------------------ + +AC_DEFUN([CHECK_CORBA_IN_GUI],[ + +AC_CHECKING(for full SalomeGUI) + +SalomeGUI_ok=no +CORBA_IN_GUI="no" + +AC_ARG_WITH(gui, + --with-salome_gui=DIR root directory path of full SALOME GUI installation, + SALOME_GUI_DIR="$withval",SALOME_GUI_DIR="") + +if test "x$SALOME_GUI_DIR" = "x" ; then + +# no --with-gui-dir option used + + if test "x$GUI_ROOT_DIR" != "x" ; then + + # SALOME_ROOT_DIR environment variable defined + SALOME_GUI_DIR=$GUI_ROOT_DIR + + else + + # search Salome binaries in PATH variable + AC_PATH_PROG(TEMP, libSalomeApp.so) + if test "x$TEMP" != "x" ; then + SALOME_BIN_DIR=`dirname $TEMP` + SALOME_GUI_DIR=`dirname $SALOME_BIN_DIR` + fi + + fi +# +fi + +if test -f ${SALOME_GUI_DIR}/lib/salome/libSalomeApp.so ; then + SalomeGUI_ok=yes + CORBA_IN_GUI=yes + AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR}) + + if test "x$GUI_ROOT_DIR" == "x" ; then + GUI_ROOT_DIR=${SALOME_GUI_DIR} + fi +else + AC_MSG_WARN("Cannot find compiled full SALOME GUI distribution") +fi +AC_SUBST(CORBA_IN_GUI) + +AC_MSG_RESULT(for full SALOME GUI: $SalomeGUI_ok) + +])dnl + diff --git a/adm_local/unix/config_files/check_disable_Corba.m4 b/adm_local/unix/config_files/check_disable_Corba.m4 new file mode 100644 index 000000000..c7b73cb7e --- /dev/null +++ b/adm_local/unix/config_files/check_disable_Corba.m4 @@ -0,0 +1,27 @@ +# +# Check configure option --disable-corba=[yes|no|DIR] taking into account that +# GUI_DISABLE_CORBA may be already set during build_configure, +# Set GUI_DISABLE_CORBA to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([CHECK_DISABLE_CORBA],[ + +AC_ARG_WITH(corba, + [ --disable-corba default=no ], + disable_corba="$withval",disable_corba="${GUI_DISABLE_CORBA}") + +case $disable_corba in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(******* DISABLE CORBA configuration ********) +# AC_MSG_RESULT(************************************************) + GUI_DISABLE_CORBA="yes";; + *) + GUI_DISABLE_CORBA="no" +esac + +AC_SUBST(GUI_DISABLE_CORBA) + +])dnl diff --git a/adm_local/unix/config_files/check_msg2qm.m4 b/adm_local/unix/config_files/check_msg2qm.m4 new file mode 100755 index 000000000..8d0c5474f --- /dev/null +++ b/adm_local/unix/config_files/check_msg2qm.m4 @@ -0,0 +1,57 @@ +# Check availability of Qt's msg2qm tool binary distribution +# +# Author : Jerome Roy (CEA, 2003) +# + +AC_DEFUN([CHECK_MSG2QM],[ + +AC_CHECKING(for msg2qm) + +msg2qm_ok=no + +AC_ARG_WITH(msg2qm, + [ --with-msg2qm=DIR root directory path of MSG2QM installation], + MSG2QM_DIR="$withval",MSG2QM_DIR="") + +if test "x$MSG2QM_DIR" == "x" ; then + +# no --with-MSG2QM-dir option used + + if test "x$MSG2QM_ROOT" != "x" ; then + + # MSG2QM_ROOT environment variable defined + MSG2QM_DIR=$MSG2QM_ROOT + + else + + # search MSG2QM binaries in PATH variable + AC_PATH_PROG(TEMP, msg2qm) + if test "x$TEMP" != "x" ; then + MSG2QM_DIR=`dirname $TEMP` + fi + + fi +# +fi + +# look for msg2qm in ${MSG2QM_DIR} directory +if test -f ${MSG2QM_DIR}/msg2qm ; then + msg2qm_ok=yes + MSG2QM="${MSG2QM_DIR}/msg2qm" + AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}) +else + # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory + if test -f ${MSG2QM_DIR}/bin/msg2qm ; then + msg2qm_ok=yes + MSG2QM="${MSG2QM_DIR}/bin/msg2qm" + AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin) + else + AC_MSG_WARN("Cannot find MSG2QM executable") + fi +fi + +AC_SUBST(MSG2QM) +AC_MSG_RESULT(for MSG2QM: $msg2qm_ok) + +])dnl + diff --git a/adm_local/unix/config_files/check_opengl.m4 b/adm_local/unix/config_files/check_opengl.m4 new file mode 100644 index 000000000..dd43d25a0 --- /dev/null +++ b/adm_local/unix/config_files/check_opengl.m4 @@ -0,0 +1,143 @@ +dnl Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl +AC_DEFUN([CHECK_OPENGL],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_ARG_WITH(opengl, + [ --with-opengl=DIR root directory path of OpenGL installation ], + [ + opengl_dir="$withval" + local_opengl=yes + ], [ + dirs="/usr/lib /usr/local/lib /opt/graphics/OpenGL/lib /usr/openwin/lib /usr/X11R6/lib" + ])dnl + +AC_CHECKING(for OpenGL) + +AC_SUBST(OGL_INCLUDES) +AC_SUBST(OGL_LIBS) + +OGL_INCLUDES="" +OGL_LIBS="" + +OpenGL_ok=no + +dnl openGL headers + +# by default + +if test "x$local_opengl" = "xyes" ; then + if test -f "${opengl_dir}/include/GL/gl.h" ; then + OpenGL_ok=yes + OGL_INCLUDES="-I${opengl_dir}/include" + if test "x${opengl_dir}" = "x/usr" + then + OGL_LIBS="" + else + OGL_LIBS="-L${opengl_dir}/lib" + fi + AC_MSG_RESULT(select OpenGL distribution in ${opengl_dir}) + else + AC_MSG_RESULT(no gl.h header file in ${opengl_dir}/include/GL) + fi +fi + +if test "x$OpenGL_ok" = "xno" +then + AC_CHECK_HEADERS(GL/gl.h, [OpenGL_ok=yes]) +fi + +if test "x$OpenGL_ok" = "xno" +then +# under SunOS ? + AC_CHECK_HEADERS(/usr/openwin/share/include/GL/glxmd.h, + [OpenGL_ok=yes] + OGL_INCLUDES="-I/usr/openwin/share/include/") +fi + +if test "x$OpenGL_ok" = "xno" +then +# under IRIX ? + AC_CHECK_HEADERS(/opt/graphics/OpenGL/include/GL/glxmd.h, + [OpenGL_ok=yes] + OGL_INCLUDES="-I/opt/graphics/OpenGL/include") +fi +if test "x$OpenGL_ok" = "xno" +then +# some linux OpenGL servers hide the includes in /usr/X11R6/include/GL + AC_CHECK_HEADERS(/usr/X11R6/include/GL/gl.h, + [OpenGL_ok=yes] + OGL_INCLUDES="-I/usr/X11R6/include") +fi + +if test "x$OpenGL_ok" = "xyes" +then + AC_CHECKING(for OpenGL library) + OpenGL_ok=no + for i in $dirs; do + if test -r "$i/libGL.so"; then +dnl AC_MSG_RESULT(in $i) + if test "x$i" = "x/usr/lib" + then + OGL_LIBS="" + else + OGL_LIBS="-L$i" + fi + break + fi +# under IRIX ? + if test -r "$i/libGL.sl"; then +dnl AC_MSG_RESULT(in $i) + if test "x$i" = "x/usr/lib" + then + OGL_LIBS="" + else + OGL_LIBS="-L$i" + fi + break + fi + done + LDFLAGS_old="$LDFLAGS" + LDFLAGS="$LDFLAGS $OGL_LIBS" + AC_CHECK_LIB(GL,glBegin,OpenGL_ok=yes,OpenGL_ok=no) + LDFLAGS="$LDFLAGS_old" +fi + +if test "x$OpenGL_ok" = "xyes" ; then + OGL_LIBS="$OGL_LIBS -lGL" +fi + + +OpenGLU_ok=no +LDFLAGS_old="$LDFLAGS" +LDFLAGS="$LDFLAGS $OGL_LIBS" +AC_CHECK_LIB(GLU,gluBeginSurface,OpenGLU_ok=yes,OpenGLU_ok=no) +LDFLAGS="$LDFLAGS_old" + +if test "x$OpenGLU_ok" = "xyes" ; then + OGL_LIBS="$OGL_LIBS -lGLU" +fi + +# Save cache +AC_CACHE_SAVE + +])dnl diff --git a/adm_local/unix/config_files/check_pyqt.m4 b/adm_local/unix/config_files/check_pyqt.m4 new file mode 100644 index 000000000..ee024efaf --- /dev/null +++ b/adm_local/unix/config_files/check_pyqt.m4 @@ -0,0 +1,307 @@ +dnl Copyright (C) 2003 CEA/DEN, EDF R&D + +AC_DEFUN([CHECK_PYQT],[ +AC_REQUIRE([CHECK_PYTHON])dnl +AC_REQUIRE([CHECK_QT])dnl +AC_REQUIRE([CHECK_SIP])dnl + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +AC_ARG_WITH(pyqt, + [ --with-pyqt=DIR root directory path to PyQt installation ], + [PYQTDIR="$withval" + AC_MSG_RESULT("select $withval as path to PyQt") + ]) + +AC_ARG_WITH(pyqt_sips, + [ --with-pyqt_sips=DIR a directory path to PyQt sips installation ], + [PYQT_SIPS="$withval" + AC_MSG_RESULT("select $withval as path to PyQt sips") + ]) + + +AC_ARG_WITH(pyuic, + [ --with-pyuic=EXEC pyuic executable ], + [PYUIC="$withval" + AC_MSG_RESULT("select $withval as pyqt executable") + ]) + +AC_CHECKING(for pyqt) + +pyqt_ok=yes + +dnl look for pyuic +pyqt_uic_ok=no +if test "x$PYUIC" != x; then + dnl try withval value + AC_CHECK_FILE($PYUIC,pyqt_uic_ok=yes,pyqt_uic_ok=no) +fi +if test "x$pyqt_uic_ok" == "xno"; then + dnl try ${PYQTDIR} + if test "x${PYQTDIR}" != "x"; then + if test -d ${PYQTDIR} ; then + AC_CHECK_FILE(${PYQTDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) + if test "x$pyqt_uic_ok" == "xyes"; then + PYUIC="${PYQTDIR}/pyuic" + fi + fi + fi +fi +if test "x$pyqt_uic_ok" == "xno"; then + dnl try ${SIPDIR} + if test "x${SIPDIR}" != "x"; then + if test -d ${SIPDIR} ; then + AC_CHECK_FILE(${SIPDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) + if test "x$pyqt_uic_ok" == "xyes"; then + PYUIC="${SIPDIR}/pyuic" + fi + fi + fi +fi +if test "x$pyqt_uic_ok" == "xno"; then + dnl try ${PYTHONHOME}/bin + if test "x${PYTHONHOME}" != "x"; then + if test -d ${PYTHONHOME}/bin ; then + AC_CHECK_FILE(${PYTHONHOME}/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) + if test "x$pyqt_uic_ok" == "xyes"; then + PYUIC="${PYTHONHOME}/bin/pyuic" + fi + fi + fi +fi +if test "x$pyqt_uic_ok" == "xno"; then + dnl try /usr/bin + AC_CHECK_FILE(/usr/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) + if test "x$pyqt_uic_ok" == "xyes"; then + PYUIC="/usr/bin/pyuic" + fi +fi +if test "x$pyqt_uic_ok" == "xno"; then + pyqt_ok=no +fi + +dnl look for PyQt libs +pyqt_lib_ok=no +if test "x${PYQTDIR}" != "x"; then + dnl try {PYQTDIR} + AC_CHECK_FILE(${PYQTDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + if test "x${PYQTDIR}" = "x/usr/lib" + then + PYQT_LIBS="-lqtcmodule" + else + PYQT_LIBS="-L${PYQTDIR} -lqtcmodule" + fi + else + AC_CHECK_FILE(${PYQTDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + if test "x${PYQTDIR}" = "x/usr/lib" + then + PYQT_LIBS="" + else + PYQT_LIBS="-L${PYQTDIR}" + fi + fi + fi + if test "x$pyqt_lib_ok" == "xno"; then + dnl try {PYQTDIR}/lib + if test -d {PYQTDIR}/lib; then + AC_CHECK_FILE(${PYQTDIR}/lib/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + PYQT_LIBS="-L${PYQTDIR}/lib -lqtcmodule" + else + AC_CHECK_FILE(${PYQTDIR}/lib/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + PYQT_LIBS="-L${PYQTDIR}/lib" + fi + fi + fi + fi + if test "x$pyqt_lib_ok" == "xno"; then + dnl try {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages + if test -d {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages; then + AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" + else + AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages" + fi + fi + fi + fi +fi +if test "x$pyqt_lib_ok" == "xno"; then + dnl try ${SIPDIR} + if test "x${SIPDIR}" != "x"; then + if test -d ${SIPDIR} ; then + AC_CHECK_FILE(${SIPDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + if test "x${SIPDIR}" = "x/usr/lib" + then + PYQT_LIBS="-lqtcmodule" + else + PYQT_LIBS="-L${SIPDIR} -lqtcmodule" + fi + else + AC_CHECK_FILE(${SIPDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + if test "x${SIPDIR}" = "x/usr/lib" + then + PYQT_LIBS="" + else + PYQT_LIBS="-L${SIPDIR}" + fi + fi + fi + fi + fi +fi +if test "x$pyqt_lib_ok" == "xno"; then + dnl try ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages + if test "x${PYTHONHOME}" != "x"; then + if test -d ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages ; then + AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" + else + AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages" + fi + fi + fi + fi +fi +if test "x$pyqt_lib_ok" == "xno"; then + dnl try /usr/lib/python${PYTHON_VERSION}/site-packages + AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" + else + AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) + if test "x$pyqt_lib_ok" == "xyes"; then + PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages" + fi + fi +fi +if test "x$pyqt_lib_ok" == "xno"; then + pyqt_ok=no +fi + +dnl look for PyQt sips +pyqt_sips_ok=no +dnl try ${PYQT_SIPS} or ${PYQT_SIPS}/qt +if test "x${PYQT_SIPS}" != "x"; then + AC_CHECK_FILE(${PYQT_SIPS}/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) + if test "x$pyqt_sips_ok" == "xno"; then + AC_CHECK_FILE(${PYQT_SIPS}/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) + if test "x$pyqt_sips_ok" == "xyes"; then + PYQT_SIPS="${PYQT_SIPS}/qt" + fi + fi +fi +if test "x$pyqt_sips_ok" == "xno"; then + dnl try ${PYQTDIR}/sip + if test "x${PYQTDIR}" != "x"; then + if test -d ${PYQTDIR}/sip ; then + AC_CHECK_FILE(${PYQTDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) + if test "x$pyqt_sips_ok" == "xyes"; then + PYQT_SIPS="${PYQTDIR}/sip" + else + AC_CHECK_FILE(${PYQTDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) + if test "x$pyqt_sips_ok" == "xyes"; then + PYQT_SIPS="${PYQTDIR}/sip/qt" + fi + fi + fi + fi +fi +if test "x$pyqt_sips_ok" == "xno"; then + dnl try ${SIPDIR}/sip + if test "x${SIPDIR}" != "x"; then + if test -d ${SIPDIR}/sip ; then + AC_CHECK_FILE(${SIPDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) + if test "x$pyqt_sips_ok" == "xyes"; then + PYQT_SIPS="${SIPDIR}/sip" + else + AC_CHECK_FILE(${SIPDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) + if test "x$pyqt_sips_ok" == "xyes"; then + PYQT_SIPS="${SIPDIR}/sip/qt" + fi + fi + fi + fi +fi +if test "x$pyqt_sips_ok" == "xno"; then + dnl try /usr/share/sip + if test -d /usr/share/sip ; then + AC_CHECK_FILE(/usr/share/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) + if test "x$pyqt_sips_ok" == "xyes"; then + PYQT_SIPS="/usr/share/sip" + else + AC_CHECK_FILE(/usr/share/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) + if test "x$pyqt_sips_ok" == "xyes"; then + PYQT_SIPS="/usr/share/sip/qt" + fi + fi + fi +fi +if test "x$pyqt_sips_ok" == "xno"; then + pyqt_ok=no +else + PYQT_INCLUDES="-I$PYQT_SIPS" + + dnl Additional sip flags required for correct wrappers compilation + AC_MSG_CHECKING(which qt classes should be excluded) + + PYQT_SIPFLAGS="" + + CXXFLAGS_old=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $QT_INCLUDES" + LIBS_old=$LIBS + LIBS="$LIBS $QT_LIBS" + + AC_TRY_COMPILE([#include ], + [new QCDEStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_CDE") + AC_TRY_COMPILE([#include ], + [new QInterlaceStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_INTERLACE") + AC_TRY_COMPILE([#include ], + [new QMotifStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIF") + AC_TRY_COMPILE([#include ], + [new QMotifPlusStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIFPLUS") + AC_TRY_COMPILE([#include ], + [new QPlatinumStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_PLATINUM") + AC_TRY_COMPILE([#include ], + [new QSGIStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_SGI") + AC_TRY_COMPILE([#include ], + [new QWindowsStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWS") + AC_TRY_COMPILE([#include ], + [new QWindowsXPStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWSXP") + + LIBS="$LIBS -lqassistantclient" + AC_TRY_LINK([#include ], + [new QAssistantClient("foo");],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_ASSISTANTCLIENT") + + AC_MSG_RESULT(done) + + CXXFLAGS=$CXXFLAGS_old + LIBS=$LIBS_old +fi + +AC_SUBST(PYQT_INCLUDES) +AC_SUBST(PYQT_LIBS) +AC_SUBST(PYQT_SIPS) +AC_SUBST(PYUIC) +AC_SUBST(PYQT_SIPFLAGS) + +AC_LANG_RESTORE + +AC_MSG_RESULT(for pyqt: $pyqt_ok) + +])dnl +dnl + + diff --git a/adm_local/unix/config_files/check_qt.m4 b/adm_local/unix/config_files/check_qt.m4 new file mode 100644 index 000000000..ab2869c21 --- /dev/null +++ b/adm_local/unix/config_files/check_qt.m4 @@ -0,0 +1,175 @@ +dnl Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl + +AC_DEFUN([CHECK_QT],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl +AC_REQUIRE([CHECK_OPENGL])dnl + +AC_CHECKING(for QT) +qt_ok=yes + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +if test "x$QTDIR" = "x" +then + AC_MSG_RESULT(please define QTDIR variable) + qt_ok=no +else + AC_MSG_RESULT(QTDIR is $QTDIR) + qt_inc_ok=no + QTINC="" + AC_CHECK_FILE(${QTDIR}/include/qt3/qglobal.h,QTINC="/qt3",QTINC="") + QT_VERS=`grep "QT_VERSION_STR" ${QTDIR}/include${QTINC}/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'` + AC_MSG_RESULT(Qt version is $QT_VERS) + QT_VERS="Qt_"`echo $QT_VERS | sed -e 's%\"%%g' -e 's%\.%_%g'` +fi + +if test "x$qt_ok" = "xyes" +then + if test -f ${QTDIR}/bin/moc + then + MOC=${QTDIR}/bin/moc + else + AC_PATH_PROG(MOC, moc) + fi + if test "x$MOC" = "x" + then + qt_ok=no + AC_MSG_RESULT(moc qt-compiler not in PATH variable) + else + qt_ok=yes + AC_MSG_RESULT(moc found) + fi +fi + +if test "x$qt_ok" = "xyes" +then + if test -f ${QTDIR}/bin/uic + then + UIC=${QTDIR}/bin/uic + else + AC_PATH_PROG(UIC, uic) + fi + if test "x$UIC" = "x" + then + qt_ok=no + AC_MSG_RESULT(uic qt-interface compiler not in PATH variable) + else + qt_ok=yes + AC_MSG_RESULT(uic found) + fi +fi + +AC_SUBST(QTDIR) +QT_ROOT=$QTDIR + +if test "x$qt_ok" = "xyes" +then + CPPFLAGS_old=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$QTDIR/include${QTINC}" + + AC_LANG_CPLUSPLUS + AC_CHECK_HEADER(qaction.h,qt_ok=yes ,qt_ok=no) + + CPPFLAGS=$CPPFLAGS_old + + AC_MSG_CHECKING(include of qt headers) + + if test "x$qt_ok" = "xno" + then + AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include) + AC_MSG_RESULT(QTDIR environment variable may be wrong) + else + AC_MSG_RESULT(yes) + QT_INCLUDES="-I${QT_ROOT}/include${QTINC} -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE" + QT_MT_INCLUDES="-I${QT_ROOT}/include${QTINC} -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE" + fi +fi + +if test "x$qt_ok" = "xyes" +then + AC_MSG_CHECKING(linking qt library) + LIBS_old=$LIBS + if test "x$QTDIR" = "x/usr" + then + LIBS="$LIBS -lqt-mt $OGL_LIBS" + else + LIBS="$LIBS -L$QTDIR/lib -lqt-mt $OGL_LIBS" + fi + + CXXFLAGS_old=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $QT_INCLUDES" + + AC_CACHE_VAL(salome_cv_lib_qt,[ + AC_TRY_LINK( +#include +, int n; + char **s; + QApplication a(n, s); + a.exec();, + eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no") + ]) + qt_ok="$salome_cv_lib_qt" + + if test "x$qt_ok" = "xno" + then + AC_MSG_RESULT(unable to link with qt library) + AC_MSG_RESULT(QTDIR environment variable may be wrong) + else + AC_MSG_RESULT(yes) + if test "x$QTDIR" = "x/usr" + then + QT_LIBS=" -lqt-mt" + QT_MT_LIBS=" -lqt-mt" + else + QT_LIBS="-L$QTDIR/lib -lqt-mt" + QT_MT_LIBS="-L$QTDIR/lib -lqt-mt" + fi + fi + + LIBS=$LIBS_old + CXXFLAGS=$CXXFLAGS_old + +fi + +AC_SUBST(MOC) +AC_SUBST(UIC) + +AC_SUBST(QT_ROOT) +AC_SUBST(QT_INCLUDES) +AC_SUBST(QT_LIBS) +AC_SUBST(QT_MT_LIBS) +AC_SUBST(QT_VERS) + +AC_LANG_RESTORE + +AC_MSG_RESULT(for qt: $qt_ok) + +# Save cache +AC_CACHE_SAVE + +])dnl +dnl diff --git a/adm_local/unix/config_files/check_qwt.m4 b/adm_local/unix/config_files/check_qwt.m4 new file mode 100644 index 000000000..13bf90914 --- /dev/null +++ b/adm_local/unix/config_files/check_qwt.m4 @@ -0,0 +1,151 @@ +dnl Copyright (C) 2003 CEA/DEN, EDF R&D + +AC_DEFUN([CHECK_QWT],[ +AC_REQUIRE([CHECK_QT])dnl + +AC_CHECKING(for qwt) + +qwt_ok=yes + +dnl were is qwt ? + +AC_ARG_WITH(qwt, + [ --with-qwt=DIR directory path to QWT installation ], + [QWTHOME="$withval" + AC_MSG_RESULT("select $withval as path to QWT") + ]) + +AC_ARG_WITH(qwt_inc, + [ --with-qwt_inc=DIR directory path to QWT includes ], + [QWT_INCLUDES="$withval" + AC_MSG_RESULT("select $withval as path to QWT includes") + ]) + +if test -z $QWTHOME; then + AC_MSG_RESULT(QWTHOME not defined) + exits_ok=no + if test "x$exits_ok" = "xno"; then + for d in /usr/local /usr ; do + AC_CHECK_FILE(${d}/lib/libqwt.so,exits_ok=yes,exits_ok=no) + if test "x$exits_ok" = "xyes"; then + QWTHOME=$d + AC_MSG_RESULT(libqwt.so detected in $d/lib) + fi + done + fi + if test "x$exits_ok" = "xno"; then + for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do + if test -f $d/libqwt.so ; then + AC_MSG_RESULT(libqwt.so detected in $d) + QWTHOME=$d + QWTHOME=`echo ${QWTHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + exits_ok=yes + break + fi + done + fi + if test "x$exits_ok" = "xyes"; then + if test -z $QWT_INCLUDES; then + QWT_INCLUDES=$QWTHOME"/include/qwt" + if test ! -f $QWT_INCLUDES/qwt.h ; then + QWT_INCLUDES=$QWTHOME"/include" + fi + if test ! -f $QWT_INCLUDES/qwt.h ; then + QWT_INCLUDES=/usr/lib/qt3/include/qwt + fi + fi + fi +else + if test -z $QWT_INCLUDES; then + QWT_INCLUDES="$QWTHOME/include" + fi +fi + +if test "x$qwt_ok" = xno -o ! -d "$QWTHOME" ; then + AC_MSG_RESULT(no) + AC_MSG_WARN(qwt not found) + qwt_ok=no +else + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + CPPFLAGS_old=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$QWT_INCLUDES" + CPPFLAGS="$CPPFLAGS $QT_INCLUDES" + + AC_CHECK_HEADER(qwt.h,qwt_ok=yes,qwt_ok=no) + + CPPFLAGS=$CPPFLAGS_old + + if test "x$qwt_ok" = xno ; then + AC_MSG_RESULT(no) + AC_MSG_WARN(qwt not found) + else + qwt_ok=yes + fi + +if test "x$qwt_ok" = "xyes" +then + AC_MSG_CHECKING(linking qwt library) + LIBS_old=$LIBS + if test "x$QTDIR" = "x/usr" + then + LIBS="$LIBS -lqt-mt" + else + LIBS="$LIBS -L$QTDIR/lib -lqt-mt" + fi + if test "x$QWTHOME" = "x/usr" + then + LIBS="$LIBS -lqwt" + else + LIBS="$LIBS -L$QWTHOME/lib -lqwt" + fi + + CXXFLAGS_old=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $QT_INCLUDES -I$QWT_INCLUDES" + + AC_CACHE_VAL(salome_cv_lib_qwt,[ + AC_TRY_LINK( +#include +#include +, int n; + char **s; + QApplication a(n, s); + QwtPlot* p; + a.setMainWidget(p); + a.exec();, + eval "salome_cv_lib_qwt=yes",eval "salome_cv_lib_qwt=no") + ]) + qwt_ok="$salome_cv_lib_qwt" + + if test "x$qwt_ok" = "xno" + then + AC_MSG_RESULT(unable to link with qwt library) + AC_MSG_RESULT(QWTHOME environment variable may be wrong) + else + QWT_INCLUDES="-I$QWT_INCLUDES" + if test "x$QWTHOME" = "x/usr" + then + QWT_LIBS=" -lqwt" + else + QWT_LIBS="-L$QWTHOME/lib -lqwt" + fi + + AC_SUBST(QWT_INCLUDES) + AC_SUBST(QWT_LIBS) + + AC_MSG_RESULT(yes) + fi + + LIBS=$LIBS_old + CXXFLAGS=$CXXFLAGS_old + +fi + + + AC_LANG_RESTORE + +fi + + +])dnl +dnl diff --git a/adm_local/unix/config_files/check_sip.m4 b/adm_local/unix/config_files/check_sip.m4 new file mode 100644 index 000000000..245f2382e --- /dev/null +++ b/adm_local/unix/config_files/check_sip.m4 @@ -0,0 +1,168 @@ +dnl Copyright (C) 2003 CEA/DEN, EDF R&D + +AC_DEFUN([CHECK_SIP],[ +AC_REQUIRE([CHECK_PYTHON])dnl +AC_REQUIRE([CHECK_QT])dnl + +sip_ok=yes + +AC_ARG_WITH(sip, + [ --with-sip=EXEC sip executable ], + [SIP="$withval" + AC_MSG_RESULT("select $withval as sip executable") + ], [ + AC_PATH_PROG(SIP, sip) + ]) + +if test "x$SIP" = "x" ; then + sip_ok=no + AC_MSG_RESULT(sip not in PATH variable) +else + version=`$SIP -V` + AC_MSG_RESULT(sip version is $version) + case "$version" in + 3.2*) + SIP_VERS=v3_old ;; + 3.3*) + SIP_VERS=v3_old ;; + 3.4*) + SIP_VERS=v3_old ;; + 3.5*) + SIP_VERS=v3_old ;; + 3.6*) + SIP_VERS=v3_old ;; + 3.7*) + SIP_VERS=v3_old ;; + 3.8*) + SIP_VERS=v3_old ;; + 3.9*) + SIP_VERS=v3_old ;; + 3.10*) + SIP_VERS=v3_new ;; + 4.1*) + SIP_VERS=v4_old ;; + 4.2*) + SIP_VERS=v4_new ;; + *) + AC_MSG_RESULT(sip version $version not supported) + SIP_VERS=unsupported ;; + esac + + sip_ok=no + dnl Search sip.h file + if test "x$SIPDIR" != "x" ; then + dnl look for sip.h in ${SIPDIR} + AC_CHECK_FILE(${SIPDIR}/sip.h,sip_ok=yes,sip_ok=no) + if test "x$sip_ok" == "xyes" ; then + SIP_INCLUDES="-I${SIPDIR}" + fi + if test "x$sip_ok" == "xno" ; then + dnl look for sip.h in ${SIPDIR}/include/python${PYTHON_VERSION} + if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then + AC_CHECK_FILE(${SIPDIR}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) + if test "x$sip_ok" == "xyes" ; then + SIP_INCLUDES="-I${SIPDIR}/include/python${PYTHON_VERSION}" + fi + fi + fi + fi + if test "x$sip_ok" == "xno" ; then + dnl look for sip.h in ${PYTHON_PREFIX}/include/python${PYTHON_VERSION} + if test -d ${PYTHON_PREFIX}/include/python${PYTHON_VERSION} ; then + AC_CHECK_FILE(${PYTHON_PREFIX}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) + if test "x$sip_ok" == "xyes" ; then + SIP_INCLUDES="${PYTHON_INCLUDES}" + fi + fi + fi + if test "x$sip_ok" == "xno" ; then + dnl look for sip.h in /usr/include/python${PYTHON_VERSION} + if test -d /usr/include/python${PYTHON_VERSION} ; then + AC_CHECK_FILE(/usr/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) + if test "x$sip_ok" == "xyes" ; then + SIP_INCLUDES="/usr/include/python${PYTHON_VERSION}" + fi + fi + fi + + dnl Search (lib)sip.so file + sip_lib_ok=no + if test "x$SIPDIR" != "x" ; then + dnl look for (lib)sip.so in ${SIPDIR} + AC_CHECK_FILE(${SIPDIR}/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) + if test "x$sip_lib_ok" == "xyes" ; then + if test "x${SIPDIR}" = "x/usr/lib" + then + SIP_LIBS="-lsip" + else + SIP_LIBS="-L${SIPDIR} -lsip" + fi + else + AC_CHECK_FILE(${SIPDIR}/sip.so,sip_lib_ok=yes,sip_lib_ok=no) + if test "x$sip_lib_ok" == "xyes" ; then + if test "x${SIPDIR}" = "x/usr/lib" + then + SIP_LIBS="" + else + SIP_LIBS="-L${SIPDIR}" + fi + fi + fi + + if test "x$sip_lib_ok" == "xno" ; then + dnl look for (lib)sip.so in ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages + if test -d ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages ; then + AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) + if test "x$sip_lib_ok" == "xyes" ; then + SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip" + else + AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) + if test "x$sip_lib_ok" == "xyes" ; then + SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages" + fi + fi + fi + fi + fi + if test "x$sip_lib_ok" == "xno" ; then + dnl look for (lib)sip.so in ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages + if test -d ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages ; then + AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) + if test "x$sip_lib_ok" == "xyes" ; then + SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -lsip" + else + AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) + if test "x$sip_lib_ok" == "xyes" ; then + SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages" + fi + fi + fi + fi + if test "x$sip_lib_ok" == "xno" ; then + dnl look for (lib)sip.so in /usr/lib/python${PYTHON_VERSION}/site-packages + if test -d /usr/lib/python${PYTHON_VERSION}/site-packages ; then + AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) + if test "x$sip_lib_ok" == "xyes" ; then + SIP_LIBS="-L$/usr/lib/python${PYTHON_VERSION}/site-packages -lsip" + else + AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) + if test "x$sip_lib_ok" == "xyes" ; then + SIP_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages" + fi + fi + fi + fi + if test "x$sip_lib_ok" == "xno" ; then + sip_ok=no + fi +fi + +AC_SUBST(SIP) +AC_SUBST(SIP_INCLUDES) +AC_SUBST(SIP_LIBS) +AC_SUBST(SIP_VERS) + +AC_MSG_RESULT(for sip: $sip_ok) + +])dnl +dnl diff --git a/adm_local/unix/config_files/check_vtk.m4 b/adm_local/unix/config_files/check_vtk.m4 new file mode 100644 index 000000000..df9245b5d --- /dev/null +++ b/adm_local/unix/config_files/check_vtk.m4 @@ -0,0 +1,148 @@ +dnl Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl + +AC_DEFUN([CHECK_VTK],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl + +AC_CHECKING(for VTK) + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +AC_SUBST(VTK_INCLUDES) +AC_SUBST(VTK_LIBS) +AC_SUBST(VTKPY_MODULES) + +VTK_INCLUDES="" +VTK_LIBS="" +VTKPY_MODULES="" + +vtk_ok=no + +AC_PATH_X + +if test "x$OpenGL_ok" != "xyes" +then + AC_MSG_WARN(vtk needs OpenGL correct configuration, check configure output) +fi + +if test "x$x_libraries" != "x" +then + LXLIB="-L$x_libraries" +else + LXLIB="" +fi + +if test "x$x_libraries" = "x/usr/lib" +then + LXLIB="" +fi + +if test "x$x_libraries" = "x/usr/lib" +then + LXLIB="" +fi + +if test "x$x_libraries" = "x/usr/lib" +then + LXLIB="" +fi + +LOCAL_INCLUDES="$OGL_INCLUDES" +LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS $LXLIB -lX11 -lXt" +TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS $LXLIB -lX11 -lXt" + +if test -z $VTKHOME +then + AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled) + if test -f /usr/include/vtk/vtkPlane.h ; then + AC_MSG_RESULT(trying /usr) + VTKHOME="/usr" + fi +fi + +if test ! -z $VTKHOME +then + LOCAL_INCLUDES="-I$VTKHOME/include/vtk $LOCAL_INCLUDES" + LOCAL_LIBS="-L$VTKHOME/lib/vtk $LOCAL_LIBS" + TRY_LINK_LIBS="-L$VTKHOME/lib/vtk $TRY_LINK_LIBS" +fi + +dnl vtk headers +CPPFLAGS_old="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" + +AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no") + + CPPFLAGS="$CPPFLAGS_old" + + if test "x$vtk_ok" = "xyes" + then + VTK_INCLUDES="$LOCAL_INCLUDES" + + dnl vtk libraries + + AC_MSG_CHECKING(linking VTK library) + + LIBS_old="$LIBS" +# LIBS="$LIBS $TRY_LINK_LIBS" + LIBS="$LIBS $LOCAL_LIBS" + CPPFLAGS_old="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $VTK_INCLUDES" + + dnl VTKPY_MODULES="$VTKHOME/python" + + AC_CACHE_VAL(salome_cv_lib_vtk,[ + AC_TRY_LINK( +#include "vtkPlane.h" +, vtkPlane *p = vtkPlane::New();, + eval "salome_cv_lib_vtk=yes",eval "salome_cv_lib_vtk=no") + ]) + vtk_ok="$salome_cv_lib_vtk" + LIBS="$LIBS_old" + CPPFLAGS="$CPPFLAGS_old" + +fi + +if test "x$vtk_ok" = "xno" +then + AC_MSG_RESULT("no") + AC_MSG_WARN(unable to link with vtk library) +else + AC_MSG_RESULT("yes") + VTK_LIBS="$LOCAL_LIBS" + VTK_MT_LIBS="$LOCAL_LIBS" +fi + +AC_MSG_RESULT("for vtk: $vtk_ok") + +AC_LANG_RESTORE + +# Save cache +AC_CACHE_SAVE + +])dnl + + diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index cb1d7e470..78506b08c 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -1,6 +1,14 @@ # common directories to put headerfiles inc_builddir=$(top_builddir)/include/salome +GUI_DISABLE_CORBA=@GUI_DISABLE_CORBA@ +DISABLE_GLVIEWER=@DISABLE_GLVIEWER@ +DISABLE_PYCONSOLE=@DISABLE_PYCONSOLE@ +DISABLE_PLOT2DVIEWER=@DISABLE_PLOT2DVIEWER@ +DISABLE_SUPERVGRAPHVIEWER=@DISABLE_SUPERVGRAPHVIEWER@ +DISABLE_OCCVIEWER=@DISABLE_OCCVIEWER@ +DISABLE_VTKVIEWER=@DISABLE_VTKVIEWER@ +DISABLE_SALOMEOBJECT=@DISABLE_SALOMEOBJECT@ @SET_MAKE@ SHELL=/bin/sh @@ -254,14 +262,9 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base ACLOCAL_SRC = \ -ac_cxx_bool.m4 check_corba.m4 check_vtk.m4 \ -ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \ -ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \ -ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \ -ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \ -ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \ -ac_cc_warnings.m4 check_qt.m4 check_swig.m4 \ -check_boost.m4 check_msg2qm.m4 - -$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) +check_qt.m4 check_vtk.m4 check_qwt.m4 \ +check_sip.m4 check_msg2qm.m4 check_pyqt.m4 \ +check_opengl.m4 + +$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=$(top_srcdir)/adm_local/unix/config_files/%) cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files diff --git a/adm_local/unix/make_conclude.in b/adm_local/unix/make_conclude.in new file mode 100644 index 000000000..a4efd1893 --- /dev/null +++ b/adm_local/unix/make_conclude.in @@ -0,0 +1,421 @@ +#======================================================================= +# This section of this makefile comes from the file +# 'adm/unix/make_conclude' which was generated with config.status +# from file adm/unix/make_conclude.in +#======================================================================= +# -* Makefile *- +# +# Authors : Patrick GOLDBRONN (CEA) - Marc Tajchman (CEA) +# Date : 6/07/2001 +# $Header$ +# + +ifneq ($(GUI_DISABLE_CORBA),yes) +# ORB Specifics rules + +@CORBA@ + +# transform idl reference in appropriate obj file +LIB_CLIENT_SRC = $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX)) +LIB_SERVER_SRC = $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_CXX)) +LIB_SWIG_SRC = $(SWIG_DEF:%.i=%_wrap.cxx) +else +LIB_CLIENT_SRC = +LIB_SERVER_SRC = +LIB_SWIG_SRC = +endif + +LIB_MOC_SRC = $(LIB_MOC:%.h=%_moc.cxx) +LIB_SRC+=$(LIB_MOC_SRC) +LIB_DEP= $(LIB_SRC) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(LIB_SWIG_SRC) + +ifneq ($(GUI_DISABLE_CORBA),yes) +LIB_CLIENT_OBJ = $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ)) +LIB_SERVER_OBJ = $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ)) +LIB_SWIG_OBJ = $(LIB_SWIG_SRC:%.cxx=%.lo) +else +LIB_CLIENT_OBJ = +LIB_SERVER_OBJ = +LIB_SWIG_OBJ = +endif + +# transform c file in appropriate libtool obj file (.c, .cc and .cxx) +LIB_OBJ_C = $(patsubst %.c, %.lo, $(filter %.c, $(LIB_SRC))) +LIB_OBJ_CC = $(patsubst %.cc, %.lo, $(filter %.cc, $(LIB_SRC))) +LIB_OBJ_CXX = $(patsubst %.cxx, %.lo, $(filter %.cxx, $(LIB_SRC))) +LIB_OBJ_F = $(patsubst %.f, %.lo, $(filter %.f, $(LIB_SRC))) + +# all libtool obj file in library +LIB_OBJ = $(LIB_OBJ_CXX) $(LIB_OBJ_CC) $(LIB_OBJ_C) $(LIB_CLIENT_OBJ:%.o=%.lo) $(LIB_SERVER_OBJ:%.o=%.lo) $(LIB_SWIG_OBJ) $(LIB_OBJ_F) + +# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib/salome/%.la) +LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib/salome/%.la, $(filter %.la, $(LIB))) +LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib/salome/%.a, $(filter %.a, $(LIB))) +LIB_BUILD_SO = $(patsubst %.so, $(top_builddir)/lib/salome/%.so, $(filter %.so, $(LIB))) + +ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),) +ifneq ($(GUI_DISABLE_CORBA),yes) +LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB))) +else +LIB_SWIG = +endif +else +LIB_SWIG = +endif + +lib: $(LIB_BUILD) $(LIB_BUILD_SO) $(LIB_CLIENT_PY) +# we don't build static library ! + +$(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la + -$(RM) $@ + -$(RM) $(patsubst %.la, %.so, $@) + -$(RM) $(patsubst %.la, %.a, $@) + ln -sf $(CURDIR)/$< $@ || true + ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \ + $(patsubst %.la, %.so, $@) || true + ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \ + $(patsubst %.la, %.so, $@).0 || true + + if ! test -z $(LIB_SWIG) ; then \ + ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\ + fi; + +$(LIB_BUILD_A): $(top_builddir)/lib/salome/%.a: %.a + -$(RM) $@ + ln -sf $(CURDIR)/$< $@ || true + +$(LIB_BUILD_SO): $(top_builddir)/lib/salome/%.so: %.so + -$(RM) $@ + ln -sf $(CURDIR)/$< $@ || true + +$(LIB): $(LIB_OBJ) + @$(LT) --mode=link $(CXX) -shared -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) + +# transform idl reference in appropriate obj file +ifneq ($(GUI_DISABLE_CORBA),yes) +BIN_CLIENT_SRC = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX)) +BIN_SERVER_SRC = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_CXX)) +else +BIN_CLIENT_SRC = +BIN_SERVER_SRC = +endif +BIN_MOC_SRC = $(BIN_MOC:%.h=%_moc.cxx) +BIN_SRC+=$(BIN_MOC_SRC) +BIN_DEP=$(BIN:%=%.cxx) $(BIN_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC) + +ifneq ($(GUI_DISABLE_CORBA),yes) +BIN_CLIENT_OBJ = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ)) +BIN_SERVER_OBJ = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ)) +else +BIN_CLIENT_OBJ = +BIN_SERVER_OBJ = +endif +# transform c file in appropriate libtool obj file (.c) +BIN_OBJ_C = $(patsubst %.c, %.o, $(filter %.c, $(BIN_SRC))) +# transform c++ file in appropriate libtool obj file (.cc and .cxx) +BIN_OBJ_CC = $(patsubst %.cc, %.o, $(filter %.cc, $(BIN_SRC))) +BIN_OBJ_CXX = $(patsubst %.cxx, %.o, $(filter %.cxx, $(BIN_SRC))) +# all obj file in bin target +BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ) + +bin: $(BIN:%=$(top_builddir)/bin/salome/%) $(BIN) $(LIB) pyscripts sharedpyscripts + +BIN_LIB=$(LIB:lib%.la=-l%) + +$(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%): $(top_builddir)/bin/salome/%: % + -$(RM) $@ + ln -sf $(CURDIR)/$< $@ + +$(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN) + +# copy python scripts in $(top_builddir)/bin/salome +# + +UI_FILES = $(notdir $(wildcard $(srcdir)/*.ui)) +UI_PY_FILES_PY = $(patsubst %.ui, %.py, $(UI_FILES)) +UI_PY_FILES = $(filter-out $(EXPORT_PYSCRIPTS) ,$(UI_PY_FILES_PY)) + +DEST_PYSCRIPTS = $(EXPORT_PYSCRIPTS:%=$(top_builddir)/bin/salome/%) +DEST_UI_PY_FILES = $(UI_PY_FILES:%=$(top_builddir)/bin/salome/%) +pyscripts: $(DEST_PYSCRIPTS) $(UI_PY_FILES) $(DEST_UI_PY_FILES) +$(DEST_PYSCRIPTS): $(top_builddir)/bin/salome/%: % + cp -f $< $@ + +# generate generic python scripts from *.ui files +# +$(UI_PY_FILES): %.py: %.ui + $(PYUIC) $< -o $@ + +# copy ui-generated python scripts in $(top_builddir)/bin +# +$(DEST_UI_PY_FILES): $(top_builddir)/bin/salome/%: % + cp -f $< $@ + +# copy pyqt files in $(PYTHON_SHARED_SITE) +# +PYTHON_SHARED_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/salome/shared_modules + +$(PYTHON_SHARED_SITE): + $(INSTALL) -d $@ + +DEST_SHAREDPYSCRIPTS = $(EXPORT_SHAREDPYSCRIPTS:%=$(PYTHON_SHARED_SITE)/%) +sharedpyscripts: $(PYTHON_SHARED_SITE) $(DEST_SHAREDPYSCRIPTS) +$(DEST_SHAREDPYSCRIPTS): $(PYTHON_SHARED_SITE)/%: % + cp -f $< $@ + +check: test + +tests: test + +test: $(LIB) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%) + + +# copy header file in $(inc_builddir) +# +DEST_HEADERS = $(EXPORT_HEADERS:%=$(inc_builddir)/%) +inc: $(DEST_HEADERS) +$(DEST_HEADERS): $(inc_builddir)/%: % + cp -f $< $@ + +# build resources file (icons and messages) : .qm file from .po file +RESOURCES_FILES_ALL := $(notdir $(wildcard $(srcdir)/resources/*)) +RESOURCES_FILES_ALL := $(filter-out CVS, $(RESOURCES_FILES_ALL)) +RESOURCES_FILES_ALL := $(filter-out %.po, $(RESOURCES_FILES_ALL)) +RESOURCES_FILES ?= $(RESOURCES_FILES_ALL) + +resources: resources-po resources-cp + +resources-po: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm) + +resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%) + +$(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%): $(top_builddir)/share/salome/resources/% : % + cp -fr $< $@; + +# Make installation directories if they don't exist. +$(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir): + $(INSTALL) -d $@ && chmod 755 $@ + +# Install the library, the public header files, and programs. +install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm install-res + @for f in X $(LIB); do \ + if test $$f != X; then \ + ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \ + fi; \ + done + @if ! test -z $(LIB_SWIG) ; then \ + (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \ + fi; + @for f in X $(BIN); do \ + if test $$f != X; then \ + ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \ + fi; \ + done +# Install tests programmes in bindir + @for f in X $(TEST_PROGS); do \ + if test $$f != X; then \ + ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \ + fi; \ + done +# Install exported includes in includedir + @for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do \ + if test $$f != X; then \ + (cp -p -f $$f $(includedir) || exit 1); \ + fi; \ + done + +# Install python script in $(bindir) +install-python: $(bindir) $(EXPORT_PYSCRIPTS:%=install-%) $(UI_PY_FILES:%=install-%) + +$(UI_PY_FILES:%=install-%): install-%: % + $(INSTALL_PROGRAM) $< $(bindir)/. + +$(EXPORT_PYSCRIPTS:%=install-%): install-%: % + $(INSTALL_PROGRAM) $< $(bindir)/. + +#install-python: $(bindir) $(EXPORT_PYSCRIPTS) +# @for f in X $(EXPORT_PYSCRIPTS); do \ +# if test $$f != X; then \ +# ($(INSTALL_PROGRAM) $$f $(bindir)/. || exit 1); \ +# fi; \ +# done + +# Install pyqt script in $(install-sharedpyqt) +install-sharedpyqt: $(sharedpydir) $(EXPORT_SHAREDPYSCRIPTS:%=install-%) + +$(EXPORT_SHAREDPYSCRIPTS:%=install-%): install-%: % + $(INSTALL_PROGRAM) $< $(sharedpydir)/. + + +# generic rule to install .qm files : +install-qm: resources + $(INSTALL) -d $(datadir)/resources + @for f in X $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm); do \ + if test $$f != X; then \ + ($(INSTALL_DATA) $$f $(datadir)/resources/. || exit 1); \ + fi; \ + done + +# generic rule to install resources files (png, ini ...): +install-res: resources + $(INSTALL) -d $(datadir)/resources + @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%); do \ + if test $$f != X; then \ + ($(INSTALL_DATA) $$f $(datadir)/resources/. || exit 1); \ + fi; \ + done + +# Removes those things that `make install' (would have) installed. +uninstall: + @if test "X$(LIB)" != X; then \ + for f in $(LIB); do \ + $(LT_UNINSTALL) $(libdir)/$$f; \ + done; \ + fi + @if test "X$(BIN)" != X; then \ + for f in $(BIN); do \ + $(LT_UNINSTALL) $(bindir)/$$f; \ + done; \ + fi + @for f in X $(TEST_PROGS); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(bindir)/$$f; \ + fi; \ + done +# Uninstall exported includes in includedir + @for f in X $(EXPORT_HEADERS); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(includedir)/$$f; \ + fi; \ + done +# Uninstall python script in $(bindir) + @for f in X $(EXPORT_PYSCRIPTS); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(bindir)/$$f ; \ + fi; \ + done + +# Uninstall python script in $(bindir) + @for f in X $(UI_PY_FILES); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(bindir)/$$f ; \ + fi; \ + done + +# Uninstall pyqt script in $(sharedpydir) + @for f in X $(EXPORT_SHAREDPYSCRIPTS); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(sharedpydir)/$$f ; \ + fi; \ + done + +# Uninstall qm files + @for f in X $(PO_FILES:%.po=%.qm); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(datadir)/resources/$$f ; \ + fi; \ + done + +# remove all dependencies files +# +cleandep: + -$(RM) .dep* + +# Removes temporary files without removing the final target files. That is, +# remove things like object files but not libraries or executables. +# +mostlyclean: cleandep + -$(RM) $(LIB_OBJ) $(LIB_OBJ:.lo=.o) + -$(RM) $(BIN_OBJ) $(BIN:%=%.o) + -$(RM) $(TEST_OBJ) $(TEST_OBJ:.lo=.o) + -$(RM) $(PROG_OBJ) $(PROG_OBJ:.lo=.o) $(MOSTLYCLEAN) + +# Like `mostlyclean' except it also removes the final targets: things like +# libraries and executables. This target doesn't remove any file that +# is part of the SALOME distribution. +# +clean: mostlyclean + -$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN) + -$(RM) TAGS *~ *# core *.core + -$(RM) -r .libs + -$(RM) $(top_builddir)/lib/salome/$(LIB) + -$(RM) $(patsubst %,$(top_builddir)/bin/salome/%, $(BIN)) + -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib/salome/$(LIB)) + -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib/salome/$(LIB)) +# remove idl generated files (sources) + -$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC) +# remove idl generated files (headers) + -$(RM) $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_H)) + -$(RM) $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_H)) + -$(RM) $(LIB_MOC_SRC) $(BIN_MOC_SRC) + -$(RM) $(LIB_SWIG_SRC) + +# Like `clean' except it also removes files that were created by running +# configure. If you've unpacked the source and built without creating +# any other files, then `make distclean' will leave only the files that were +# in the distribution. +# +distclean: clean + #remove qm file ! + -$(RM) $(PO_FILES:%.po=%.qm) $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm) + #remove include files + -$(RM) $(DEST_HEADERS) + -$(RM) $(DISTCLEAN) *.bak *.old *.new .dep* + @if test -f $(srcdir)/Makefile.in; then \ + (@SETX@; $(RM) Makefile); \ + fi + + +#implicits rules +.cc.o: + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + +.cc.lo: + $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + +.cxx.o: + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + +.cxx.lo: + $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< + +.c.lo: + $(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $< + +.f.o: + $(FC) $(FFLAGS) -c $< -o $@ + +.f.lo: + $(LT) --mode=compile $(FC) $(FFLAGS) -c $< + +.ui.h: + $(UIC) -o $@ $< + +.ui.cxx: + $(UIC) -o $@ -i $*.h $< + +#pattern rules +%_moc.cxx : %.h + $(MOC) $< -o $@ + +%_wrap.cxx : %.i + $(SWIG) $(SWIG_FLAGS) -o $@ $< + +$(top_builddir)/share/salome/resources/%.qm: %.po + $(MSG2QM) $< $@ ; \ + +#------------------------------------------------------------------------------ +# The following section of this makefile contains dependencies between the +# source files and the header files. If GNU make and GCC are being used then +# the dependencies are in the form of rules that cause the information to +# be kept updated automatically. Otherwise the dependencies are listed +# explicitly and come from the `.distdep' files in the various directories. +# These files are part of the distribution and are generated automatically on +# GNU/GCC systems. +#------------------------------------------------------------------------------ + +@DEPEND@ diff --git a/build_configure b/build_configure index ec5cce644..c5dcf2d87 100755 --- a/build_configure +++ b/build_configure @@ -127,7 +127,7 @@ echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1 echo " ./adm_local/unix/make_omniorb \\" >> configure.in_tmp1 echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1 echo " ./adm_local/unix/make_commence \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1 +echo " ./adm_local/unix/make_conclude \\" >> configure.in_tmp1 echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1 \rm -f configure.in_tmp2 configure.in_tmp3 diff --git a/configure.in.base b/configure.in.base index e6be9b20d..8813d74f7 100644 --- a/configure.in.base +++ b/configure.in.base @@ -26,6 +26,41 @@ AC_SUBST(PACKAGE) VERSION=0.0.1 AC_SUBST(VERSION) +######################################################################## +# Check --disable-corba option + +GUI_DISABLE_CORBA="no" +DISABLE_PYCONSOLE="no" +DISABLE_GLVIEWER="no" +DISABLE_PLOT2DVIEWER="no" +DISABLE_SUPERVGRAPHVIEWER="no" +DISABLE_OCCVIEWER="no" +DISABLE_VTKVIEWER="no" +DISABLE_SALOMEOBJECT="no" + +for option +do + case $option in + -disable-corba=yes | --disable-corba=yes | -disable-corba | --disable-corba) + GUI_DISABLE_CORBA="yes";; + -disable-pyConsole=yes | --disable-pyConsole=yes | -disable-pyConsole | --disable-pyConsole) + DISABLE_PYCONSOLE="yes";; + -disable-glViewer=yes | --disable-glViewer=yes | -disable-glViewer | --disable-glViewer) + DISABLE_GLVIEWER="yes";; + -disable-plot2dViewer=yes | --disable-plot2dViewer=yes | -disable-plot2dViewer | --disable-plot2dViewer) + DISABLE_PLOT2DVIEWER="yes";; + -disable-supervGraphViewer=yes | --disable-supervGraphViewer=yes | \ + -disable-supervGraphViewer | --disable-supervGraphViewer) + DISABLE_SUPERVGRAPHVIEWER="yes";; + -disable-occViewer=yes | --disable-occViewer=yes | -disable-occViewer | --disable-occViewer) + DISABLE_OCCVIEWER="yes";; + -disable-vtkViewer=yes | --disable-vtkViewer=yes | -disable-vtkViewer | --disable-vtkViewer) + DISABLE_VTKVIEWER="yes";; + -disable-salomeObject=yes | --disable-salomeObject=yes | -disable-salomeObject | --disable-salomeObject) + DISABLE_SALOMEOBJECT="yes";; + esac +done + dnl dnl Initialize source and build root directories dnl @@ -151,6 +186,17 @@ dnl echo dnl CHECK_JAVA +echo +echo --------------------------------------------- +echo Testing Disable Corba +echo --------------------------------------------- +echo + +CHECK_DISABLE_CORBA +echo "GUI_DISABLE_CORBA = "$GUI_DISABLE_CORBA + +if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then + echo echo --------------------------------------------- echo testing swig @@ -158,6 +204,7 @@ echo --------------------------------------------- echo CHECK_SWIG +fi echo echo --------------------------------------------- @@ -167,6 +214,7 @@ echo ENABLE_PTHREADS +if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then echo echo --------------------------------------------- echo testing omniORB @@ -190,12 +238,20 @@ echo --------------------------------------------- echo DEFAULT_ORB=omniORB + +echo +echo --------------------------------------------- +echo testing Corba +echo --------------------------------------------- +echo + CHECK_CORBA AC_SUBST_FILE(CORBA) corba=make_$ORB CORBA=adm_local/unix/$corba +fi echo echo --------------------------------------------- echo testing openGL @@ -278,19 +334,114 @@ CHECK_QWT echo echo --------------------------------------------- -echo Testing html generators +echo Testing PyConsole echo --------------------------------------------- -echo +echo -CHECK_HTML_GENERATORS +CHECK_PYCONSOLE +echo "DISABLE_PYCONSOLE = "$DISABLE_PYCONSOLE + +echo +echo --------------------------------------------- +echo Testing GlViewer +echo --------------------------------------------- +echo + +CHECK_GLVIEWER +echo "DISABLE_GLVIEWER = "$DISABLE_GLVIEWER + +echo +echo --------------------------------------------- +echo Testing Plot2dViewer +echo --------------------------------------------- +echo + +CHECK_PLOT2DVIEWER +echo "DISABLE_PLOT2DVIEWER = "$DISABLE_PLOT2DVIEWER + +echo +echo --------------------------------------------- +echo Testing SupervGraphViewer +echo --------------------------------------------- +echo + +CHECK_SUPERVGRAPHVIEWER +echo "DISABLE_SUPERVGRAPHVIEWER = "$DISABLE_SUPERVGRAPHVIEWER + +echo +echo --------------------------------------------- +echo Testing OCCViewer +echo --------------------------------------------- +echo + +CHECK_OCCVIEWER +echo "DISABLE_OCCVIEWER = "$DISABLE_OCCVIEWER echo echo --------------------------------------------- -echo Testing Kernel +echo Testing VTKViewer echo --------------------------------------------- echo -CHECK_KERNEL +CHECK_VTKVIEWER +echo "DISABLE_VTKVIEWER = "$DISABLE_VTKVIEWER + +echo +echo --------------------------------------------- +echo Testing SalomeObject +echo --------------------------------------------- +echo + +CHECK_SALOMEOBJECT +echo "DISABLE_SALOMEOBJECT = "$DISABLE_SALOMEOBJECT + +if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then + if test "x${DISABLE_PYCONSOLE}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable PyConsole !" + exit + fi + if test "x${DISABLE_GLVIEWER}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable GlViewer !" + exit + fi + if test "x${DISABLE_PLOT2DVIEWER}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable Plot2dViewer !" + exit + fi + if test "x${DISABLE_SUPERVGRAPHVIEWER}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable SupervGraphViewer !" + exit + fi + if test "x${DISABLE_OCCVIEWER}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable OCCViewer !" + exit + fi + if test "x${DISABLE_VTKVIEWER}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable VTKViewer !" + exit + fi + if test "x${DISABLE_SALOMEOBJECT}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable SalomeObject !" + exit + fi +fi + +echo +echo --------------------------------------------- +echo Testing html generators +echo --------------------------------------------- +echo + +CHECK_HTML_GENERATORS + +if test "$GUI_DISABLE_CORBA" == "no"; then + echo + echo --------------------------------------------- + echo Testing Kernel + echo --------------------------------------------- + echo + CHECK_KERNEL +fi echo echo --------------------------------------------- @@ -298,8 +449,18 @@ echo Summary echo --------------------------------------------- echo -echo Configure +if test "$GUI_DISABLE_CORBA" == "yes"; then + echo "Configure (without Corba)" +else + echo Configure +fi + + +if test "$GUI_DISABLE_CORBA" != "yes"; then variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok" +else +variables="cc_ok lex_yacc_ok python_ok threads_ok OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok" +fi for var in $variables do @@ -307,14 +468,15 @@ do eval echo \$$var done +if test "$GUI_DISABLE_CORBA" != "yes"; then echo echo "Default ORB : $DEFAULT_ORB" echo - +fi dnl generals files which could be included in every makefile AC_SUBST_FILE(COMMENCE) COMMENCE=adm_local/unix/make_commence -AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude +AC_SUBST_FILE(CONCLUDE) CONCLUDE=adm_local/unix/make_conclude AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module dnl les dependences @@ -329,7 +491,13 @@ else fi # make other build directories -for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl +if test "$GUI_DISABLE_CORBA" == "yes"; then +dir_variables="salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl" +else +dir_variables="salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources" +fi + +for rep in $dir_variables do # if test ! -d $rep ; then # eval mkdir $rep diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 7e929f7b9..d3706badb 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -3,7 +3,10 @@ // Author: Natalia Donis // Copyright (C) CEA 2005 -#include "PythonConsole_PyInterp.h" // WARNING! This include must be the first! +#ifndef DISABLE_PYCONSOLE + #include "PythonConsole_PyInterp.h" // WARNING! This include must be the first! + #include +#endif #include "LightApp_Application.h" #include "LightApp_WidgetContainer.h" @@ -17,10 +20,7 @@ #include "LightApp_OBFilter.h" -#include "LightApp_GLSelector.h" #include "LightApp_OBSelector.h" -#include "LightApp_OCCSelector.h" -#include "LightApp_VTKSelector.h" #include "LightApp_SelectionMgr.h" #include @@ -42,25 +42,50 @@ #include #include #include -#include -#include -#include +#ifndef DISABLE_GLVIEWER + #include + #include + #include "LightApp_GLSelector.h" +#endif -#include -#include -#include +#ifndef DISABLE_PLOT2DVIEWER + #include + #include +#ifndef DISABLE_SALOMEOBJECT + #include +#else + #include +#endif +#endif -#include -#include +#ifndef DISABLE_OCCVIEWER + #include +#ifndef DISABLE_SALOMEOBJECT + #include +#else + #include +#endif + #include "LightApp_OCCSelector.h" +#endif -#include -#include -#include +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT + #include + #include + #include "LightApp_VTKSelector.h" +#else + #include + #include +#endif + #include +#endif -#include -#include -#include +#ifndef DISABLE_SUPERVGRAPHVIEWER + #include + #include + #include +#endif #include @@ -81,8 +106,10 @@ #define FIRST_HELP_ID 1000000 -#include "SALOME_InteractiveObject.hxx" -#include "SALOME_ListIO.hxx" +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_InteractiveObject.hxx" + #include "SALOME_ListIO.hxx" +#endif static const char* imageEmptyIcon[] = { "20 20 1 1", @@ -147,6 +174,7 @@ myPrefs( 0 ) mySelMgr = new LightApp_SelectionMgr( this ); myAccel = new SUIT_Accel( desktop() ); +#ifndef DISABLE_OCCVIEWER myAccel->setActionKey( SUIT_Accel::PanLeft, CTRL+Key_Left, OCCViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::PanRight, CTRL+Key_Right, OCCViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::PanUp, CTRL+Key_Up, OCCViewer_Viewer::Type() ); @@ -158,6 +186,8 @@ myPrefs( 0 ) myAccel->setActionKey( SUIT_Accel::RotateRight, ALT+Key_Right, OCCViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::RotateUp, ALT+Key_Up, OCCViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::RotateDown, ALT+Key_Down, OCCViewer_Viewer::Type() ); +#endif +#ifndef DISABLE_VTKVIEWER myAccel->setActionKey( SUIT_Accel::PanLeft, CTRL+Key_Left, VTKViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::PanRight, CTRL+Key_Right, VTKViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::PanUp, CTRL+Key_Up, VTKViewer_Viewer::Type() ); @@ -169,6 +199,7 @@ myPrefs( 0 ) myAccel->setActionKey( SUIT_Accel::RotateRight, ALT+Key_Right, VTKViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::RotateUp, ALT+Key_Up, VTKViewer_Viewer::Type() ); myAccel->setActionKey( SUIT_Accel::RotateDown, ALT+Key_Down, VTKViewer_Viewer::Type() ); +#endif connect( mySelMgr, SIGNAL( selectionChanged() ), this, SLOT( onSelection() ) ); } @@ -312,6 +343,19 @@ LightApp_SelectionMgr* LightApp_Application::selectionMgr() const return mySelMgr; } +/*!Creat action "New window" for certain type of viewer:*/ +void LightApp_Application::createActionForViewer( const int id, + const int parentId, + const QString& suffix, + const int accel ) +{ + QAction* a = createAction( id, tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ), QIconSet(), + tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ), + tr( QString( "NEW_WINDOW_%1" ).arg( suffix ) ), + accel, desktop(), false, this, SLOT( onNewWindow() ) ); + createMenu( a, parentId, -1 ); +} + /*!Create actions:*/ void LightApp_Application::createActions() { @@ -455,20 +499,20 @@ void LightApp_Application::createActions() int newWinMenu = createMenu( tr( "MEN_DESK_NEWWINDOW" ), windowMenu, -1, 0 ); createMenu( separator(), windowMenu, -1, 1 ); - QMap accelMap; - accelMap[NewGLViewId] = ALT+Key_G; - accelMap[NewPlot2dId] = ALT+Key_P; - accelMap[NewOCCViewId] = ALT+Key_O; - accelMap[NewVTKViewId] = ALT+Key_K; - for ( id = NewGLViewId; id <= NewVTKViewId; id++ ) - { - QAction* a = createAction( id, tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), QIconSet(), - tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), - tr( QString( "NEW_WINDOW_%1" ).arg( id - NewGLViewId ) ), - accelMap.contains( id ) ? accelMap[id] : 0, desk, false, this, SLOT( onNewWindow() ) ); - createMenu( a, newWinMenu, -1 ); - } +#ifndef DISABLE_GLVIEWER + createActionForViewer( NewGLViewId, newWinMenu, QString::number( 0 ), ALT+Key_G ); +#endif +#ifndef DISABLE_PLOT2DVIEWER + createActionForViewer( NewPlot2dId, newWinMenu, QString::number( 1 ), ALT+Key_P ); +#endif +#ifndef DISABLE_OCCVIEWER + createActionForViewer( NewOCCViewId, newWinMenu, QString::number( 2 ), ALT+Key_O ); +#endif +#ifndef DISABLE_VTKVIEWER + createActionForViewer( NewVTKViewId, newWinMenu, QString::number( 3 ), ALT+Key_K ); +#endif + createAction( RenameId, tr( "TOT_RENAME" ), QIconSet(), tr( "MEN_DESK_RENAME" ), tr( "PRP_RENAME" ), SHIFT+Key_R, desk, false, this, SLOT( onRenameWindow() ) ); @@ -552,18 +596,26 @@ void LightApp_Application::onNewWindow() int id = actionId( (QAction*)obj ); switch ( id ) { +#ifndef DISABLE_GLVIEWER case NewGLViewId: type = GLViewer_Viewer::Type(); break; +#endif +#ifndef DISABLE_PLOT2DVIEWER case NewPlot2dId: type = Plot2d_Viewer::Type(); break; +#endif +#ifndef DISABLE_OCCVIEWER case NewOCCViewId: type = OCCViewer_Viewer::Type(); break; +#endif +#ifndef DISABLE_VTKVIEWER case NewVTKViewId: type = VTKViewer_Viewer::Type(); break; +#endif } if ( !type.isEmpty() ) @@ -729,13 +781,31 @@ void LightApp_Application::setActiveStudy( SUIT_Study* study ) void LightApp_Application::updateCommandsStatus() { CAM_Application::updateCommandsStatus(); + QAction* a = 0; - for ( int id = NewGLViewId; id <= NewVTKViewId; id++ ) - { - QAction* a = action( id ); - if ( a ) - a->setEnabled( activeStudy() ); - } +#ifndef DISABLE_GLVIEWER + a = action( NewGLViewId ); + if( a ) + a->setEnabled( activeStudy() ); +#endif + +#ifndef DISABLE_PLOT2DVIEWER + a = action( NewPlot2dId ); + if( a ) + a->setEnabled( activeStudy() ); +#endif + +#ifndef DISABLE_OCCVIEWER + a = action( NewOCCViewId ); + if( a ) + a->setEnabled( activeStudy() ); +#endif + +#ifndef DISABLE_VTKVIEWER + a = action( NewVTKViewId ); + if( a ) + a->setEnabled( activeStudy() ); +#endif } // Helps to execute command @@ -881,6 +951,7 @@ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int st } QFont f; +#ifndef DISABLE_PYCONSOLE if( wid->inherits( "PythonConsole" ) ) { if( resourceMgr()->hasValue( "PyConsole", "font" ) ) @@ -892,6 +963,7 @@ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int st } } else +#endif f = wid->font(); myWindows[flag]->insert( sId, wid ); @@ -986,6 +1058,7 @@ LogWindow* LightApp_Application::logWindow() return lw; } +#ifndef DISABLE_PYCONSOLE /*!Get "PythonConsole"*/ PythonConsole* LightApp_Application::pythonConsole() { @@ -995,6 +1068,7 @@ PythonConsole* LightApp_Application::pythonConsole() console = (PythonConsole*)wid; return console; } +#endif /*!Update obect browser*/ void LightApp_Application::updateObjectBrowser( const bool updateModels ) @@ -1054,15 +1128,23 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType SUIT_ResourceMgr* resMgr = resourceMgr(); SUIT_ViewManager* viewMgr = 0; +#ifndef DISABLE_GLVIEWER if( vmType == GLViewer_Viewer::Type() ) { viewMgr = new GLViewer_ViewManager( activeStudy(), desktop() ); new LightApp_GLSelector( (GLViewer_Viewer2d*)viewMgr->getViewModel(), mySelMgr ); } - else if( vmType == Plot2d_Viewer::Type() ) +#endif +#ifndef DISABLE_PLOT2DVIEWER + if( vmType == Plot2d_Viewer::Type() ) { viewMgr = new Plot2d_ViewManager( activeStudy(), desktop() ); - SPlot2d_Viewer* vm = new SPlot2d_Viewer(); + Plot2d_Viewer* vm; +#ifndef DISABLE_SALOMEOBJECT + vm = new SPlot2d_Viewer(); +#else + vm = new Plot2d_Viewer(); +#endif viewMgr->setViewModel( vm );// custom view model, which extends SALOME_View interface Plot2d_ViewWindow* wnd = dynamic_cast( viewMgr->getActiveView() ); if( wnd ) @@ -1071,7 +1153,9 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType frame->setBackgroundColor( resMgr->colorValue( "Plot2d", "Background", frame->backgroundColor() ) ); } } - else if( vmType == SUPERVGraph_Viewer::Type() ) +#endif +#ifndef DISABLE_SUPERVGRAPHVIEWER + if( vmType == SUPERVGraph_Viewer::Type() ) { viewMgr = new SUPERVGraph_ViewManager( activeStudy(), desktop() ); SUPERVGraph_Viewer* vm = new SUPERVGraph_Viewer(); @@ -1079,10 +1163,17 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType if( view ) view->setBackgroundColor( resMgr->colorValue( "SUPERVGraph", "Background", view->backgroundColor() ) ); } - else if( vmType == OCCViewer_Viewer::Type() ) +#endif +#ifndef DISABLE_OCCVIEWER + if( vmType == OCCViewer_Viewer::Type() ) { viewMgr = new OCCViewer_ViewManager( activeStudy(), desktop() ); - SOCC_Viewer* vm = new SOCC_Viewer(); + OCCViewer_Viewer* vm; +#ifndef DISABLE_SALOMEOBJECT + vm = new SOCC_Viewer(); +#else + vm = new OCCViewer_Viewer(); +#endif vm->setBackgroundColor( resMgr->colorValue( "OCCViewer", "background", vm->backgroundColor() ) ); vm->setTrihedronSize( resMgr->integerValue( "OCCViewer", "trihedron_size", vm->trihedronSize() ) ); int u( 1 ), v( 1 ); @@ -1093,8 +1184,15 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType viewMgr->setViewModel( vm );// custom view model, which extends SALOME_View interface new LightApp_OCCSelector( (OCCViewer_Viewer*)viewMgr->getViewModel(), mySelMgr ); } - else if ( vmType == SVTK_Viewer::Type() ) +#endif +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT + if ( vmType == SVTK_Viewer::Type() ) +#else + if ( vmType == VTKViewer_Viewer::Type() ) +#endif { +#ifndef DISABLE_SALOMEOBJECT viewMgr = new SVTK_ViewManager( activeStudy(), desktop() ); SVTK_Viewer* vm = dynamic_cast( viewMgr->getViewModel() ); if( vm ) @@ -1104,7 +1202,14 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType resMgr->booleanValue( "VTKViewer", "relative_size", vm->trihedronRelative() ) ); new LightApp_VTKSelector( vm, mySelMgr ); } +#else + viewMgr = new VTKViewer_ViewManager( activeStudy(), desktop() ); + VTKViewer_Viewer* vm = dynamic_cast( viewMgr->getViewModel() ); + if ( vm ) + vm->setBackgroundColor( resMgr->colorValue( "VTKViewer", "background", vm->backgroundColor() ) ); +#endif } +#endif if ( !viewMgr ) return 0; @@ -1339,6 +1444,7 @@ QWidget* LightApp_Application::createWindow( const int flag ) ob->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) ); } +#ifndef DISABLE_PYCONSOLE else if ( flag == WT_PyConsole ) { PythonConsole* pyCons = new PythonConsole( desktop() ); @@ -1346,6 +1452,7 @@ QWidget* LightApp_Application::createWindow( const int flag ) wid = pyCons; // pyCons->connectPopupRequest( this, SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) ); } +#endif else if ( flag == WT_LogWindow ) { LogWindow* logWin = new LogWindow( desktop() ); @@ -1362,7 +1469,9 @@ QWidget* LightApp_Application::createWindow( const int flag ) void LightApp_Application::defaultWindows( QMap& aMap ) const { aMap.insert( WT_ObjectBrowser, Qt::DockLeft ); +#ifndef DISABLE_PYCONSOLE aMap.insert( WT_PyConsole, Qt::DockBottom ); +#endif // aMap.insert( WT_LogWindow, Qt::DockBottom ); } @@ -1614,6 +1723,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString if ( !resMgr ) return; +#ifndef DISABLE_OCCVIEWER if ( sec == QString( "OCCViewer" ) && param == QString( "trihedron_size" ) ) { int sz = resMgr->integerValue( sec, param, -1 ); @@ -1630,12 +1740,15 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString occVM->getAISContext()->UpdateCurrentViewer(); } } +#endif +#ifndef DISABLE_VTKVIEWER if ( sec == QString( "VTKViewer" ) && (param == QString( "trihedron_size" ) || param == QString( "relative_size" )) ) { int sz = resMgr->integerValue( "VTKViewer", "trihedron_size", -1 ); bool isRelative = resMgr->booleanValue( "VTKViewer", "relative_size", true ); QPtrList lst; +#ifndef DISABLE_SALOMEOBJECT viewManagers( SVTK_Viewer::Type(), lst ); for ( QPtrListIterator it( lst ); it.current() && sz >= 0; ++it ) { @@ -1650,8 +1763,11 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString vtkVM->Repaint(); } } +#endif } +#endif +#ifndef DISABLE_OCCVIEWER if ( sec == QString( "OCCViewer" ) && ( param == QString( "iso_number_u" ) || param == QString( "iso_number_v" ) ) ) { QPtrList lst; @@ -1665,6 +1781,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString mgr->getOCCViewer()->setIsos( u, v ); } } +#endif if( sec=="ObjectBrowser" ) { @@ -1688,12 +1805,14 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString updateWindows(); } +#ifndef DISABLE_PYCONSOLE if( sec=="PyConsole" ) { if( param=="font" ) if( pythonConsole() ) pythonConsole()->setFont( resMgr->fontValue( "PyConsole", "font" ) ); } +#endif } /*!Save preferences */ diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 42c26c669..3fbd81dcd 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -15,7 +15,9 @@ class LogWindow; class OB_Browser; -class PythonConsole; +#ifndef DISABLE_PYCONSOLE + class PythonConsole; +#endif class STD_Application; class LightApp_WidgetContainer; class LightApp_Preferences; @@ -42,10 +44,33 @@ class LIGHTAPP_EXPORT LightApp_Application : public CAM_Application Q_OBJECT public: - typedef enum { WT_ObjectBrowser, WT_PyConsole, WT_LogWindow, WT_User } WindowTypes; + typedef enum { WT_ObjectBrowser, +#ifndef DISABLE_PYCONSOLE + WT_PyConsole, +#endif + WT_LogWindow, + WT_User } + WindowTypes; + + enum { RenameId = CAM_Application::UserID, + +#ifndef DISABLE_GLVIEWER + NewGLViewId , +#endif + +#ifndef DISABLE_PLOT2DVIEWER + NewPlot2dId, +#endif + +#ifndef DISABLE_OCCVIEWER + NewOCCViewId, +#endif - enum { NewGLViewId = CAM_Application::UserID, NewPlot2dId, NewOCCViewId, NewVTKViewId, - PreferencesId, MRUId, RenameId, UserID }; +#ifndef DISABLE_VTKVIEWER + NewVTKViewId, +#endif + + PreferencesId, MRUId, UserID }; public: LightApp_Application(); virtual ~LightApp_Application(); @@ -62,7 +87,9 @@ public: LogWindow* logWindow(); OB_Browser* objectBrowser(); +#ifndef DISABLE_PYCONSOLE PythonConsole* pythonConsole(); +#endif virtual void updateObjectBrowser( const bool = true ); @@ -111,6 +138,10 @@ public slots: protected: virtual void createActions(); + virtual void createActionForViewer( const int id, + const int parentId, + const QString& suffix, + const int accel ); virtual SUIT_Study* createNewStudy(); virtual QWidget* createWindow( const int ); virtual void defaultWindows( QMap& ) const; diff --git a/src/LightApp/LightApp_DataOwner.cxx b/src/LightApp/LightApp_DataOwner.cxx index add34d91f..62d0977d1 100644 --- a/src/LightApp/LightApp_DataOwner.cxx +++ b/src/LightApp/LightApp_DataOwner.cxx @@ -37,6 +37,7 @@ LightApp_DataOwner { } +#ifndef DISABLE_SALOMEOBJECT /*!Constructor. Initialize by \a SALOME_InteractiveObject.*/ LightApp_DataOwner ::LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ): @@ -44,6 +45,7 @@ LightApp_DataOwner myIO(theIO) { } +#endif /*!Destructor. Do nothing.*/ LightApp_DataOwner @@ -61,6 +63,12 @@ LightApp_DataOwner return other && entry() == other->entry(); } +bool LightApp_DataOwner::operator<( const SUIT_DataOwner& obj ) const +{ + const LightApp_DataOwner* other = dynamic_cast( &obj ); + return entry() < other->entry(); +} + /*!Gets entry.*/ QString LightApp_DataOwner @@ -69,6 +77,7 @@ LightApp_DataOwner return myEntry; } +#ifndef DISABLE_SALOMEOBJECT /*!Gets SALOME_InteractiveObject.*/ const Handle(SALOME_InteractiveObject)& LightApp_DataOwner @@ -76,3 +85,4 @@ LightApp_DataOwner { return myIO; } +#endif diff --git a/src/LightApp/LightApp_DataOwner.h b/src/LightApp/LightApp_DataOwner.h index d76e6d411..849840bab 100644 --- a/src/LightApp/LightApp_DataOwner.h +++ b/src/LightApp/LightApp_DataOwner.h @@ -22,7 +22,10 @@ #include "LightApp.h" #include "SUIT_DataOwner.h" -#include "SALOME_InteractiveObject.hxx" + +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_InteractiveObject.hxx" +#endif /*! This class provide data owner objects. @@ -30,17 +33,25 @@ class LIGHTAPP_EXPORT LightApp_DataOwner : public SUIT_DataOwner { public: +#ifndef DISABLE_SALOMEOBJECT LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ); +#endif LightApp_DataOwner( const QString& ); virtual ~LightApp_DataOwner(); virtual bool isEqual( const SUIT_DataOwner& ) const; + virtual bool operator<( const SUIT_DataOwner& ) const; + +#ifndef DISABLE_SALOMEOBJECT const Handle(SALOME_InteractiveObject)& IO() const; +#endif QString entry() const; private: QString myEntry; +#ifndef DISABLE_SALOMEOBJECT Handle(SALOME_InteractiveObject) myIO; +#endif }; typedef SMART(LightApp_DataOwner) LightApp_DataOwnerPtr; diff --git a/src/LightApp/LightApp_Displayer.cxx b/src/LightApp/LightApp_Displayer.cxx index 65ce0fa3c..f06c8c10b 100644 --- a/src/LightApp/LightApp_Displayer.cxx +++ b/src/LightApp/LightApp_Displayer.cxx @@ -23,8 +23,6 @@ #include -#include - #include #include #include @@ -32,6 +30,9 @@ #include #include +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_InteractiveObject.hxx" +#endif LightApp_Displayer::LightApp_Displayer() { @@ -122,14 +123,16 @@ void LightApp_Displayer::EraseAll( const bool forced, const bool updateViewer, S bool LightApp_Displayer::IsDisplayed( const QString& entry, SALOME_View* theViewFrame ) const { SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView(); + bool res = false; if( vf ) { +#ifndef DISABLE_SALOMEOBJECT Handle( SALOME_InteractiveObject ) temp = new SALOME_InteractiveObject(); temp->setEntry( entry.latin1() ); - return vf->isVisible( temp ); + res = vf->isVisible( temp ); +#endif } - else - return false; + return res; } void LightApp_Displayer::UpdateViewer() const diff --git a/src/LightApp/LightApp_GLSelector.cxx b/src/LightApp/LightApp_GLSelector.cxx index 7913b4edf..c9415eb41 100644 --- a/src/LightApp/LightApp_GLSelector.cxx +++ b/src/LightApp/LightApp_GLSelector.cxx @@ -20,8 +20,6 @@ #include "LightApp_DataOwner.h" -#include - #include /*!Constructor. Initialize by GLViewer_Viewer2d and SUIT_SelectionMgr.*/ @@ -66,7 +64,7 @@ void LightApp_GLSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const GLViewer_Object* obj = cont->SelectedObject(); if ( obj ) { - SALOME_GLOwner* owner = dynamic_cast< SALOME_GLOwner* >( obj->owner() ); + LightApp_GLOwner* owner = dynamic_cast< LightApp_GLOwner* >( obj->owner() ); if( owner ) aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( owner->entry() ) ) ); } @@ -90,7 +88,7 @@ void LightApp_GLSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) GLViewer_Object* obj = *it; if ( obj && obj->getVisible() ) { - SALOME_GLOwner* owner = dynamic_cast< SALOME_GLOwner* >( obj->owner() ); + LightApp_GLOwner* owner = dynamic_cast< LightApp_GLOwner* >( obj->owner() ); if ( owner ) aDisplayed.insert( owner->entry(), obj ); } @@ -115,3 +113,24 @@ void LightApp_GLSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) if ( Nb > 0 ) myViewer->updateAll(); } + + +LightApp_GLOwner::LightApp_GLOwner( const char* entry ) +: GLViewer_Owner() +{ + setEntry( entry ); +} + +LightApp_GLOwner::~LightApp_GLOwner() +{ +} + +const char* LightApp_GLOwner::entry() const +{ + return myEntry.c_str(); +} + +void LightApp_GLOwner::setEntry( const char* entry ) +{ + myEntry = entry; +} diff --git a/src/LightApp/LightApp_GLSelector.h b/src/LightApp/LightApp_GLSelector.h index 069669a87..f58bb761a 100644 --- a/src/LightApp/LightApp_GLSelector.h +++ b/src/LightApp/LightApp_GLSelector.h @@ -25,6 +25,9 @@ #include +#include +#include + class LIGHTAPP_EXPORT LightApp_GLSelector : public SUIT_Selector { Q_OBJECT @@ -48,4 +51,21 @@ private: GLViewer_Viewer2d* myViewer; }; + +/*! + This class provide data owner objects for GLViewer. +*/ +class LIGHTAPP_EXPORT LightApp_GLOwner : public GLViewer_Owner +{ +public: + LightApp_GLOwner( const char* ); + ~LightApp_GLOwner(); + + const char* entry() const; + void setEntry( const char* ); + +private: + std::string myEntry; +}; + #endif diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 77d2623b9..691d68b98 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -23,16 +23,37 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT + #include + #include +#else + #include +#endif + #include +#endif +#ifndef DISABLE_OCCVIEWER + #include + #include +#ifndef DISABLE_SALOMEOBJECT + #include +#else + #include +#endif +#endif +#ifndef DISABLE_GLVIEWER + #include + #include +#endif +#ifndef DISABLE_PLOT2DVIEWER + #include + #include +#ifndef DISABLE_SALOMEOBJECT + #include +#else + #include +#endif +#endif #include @@ -206,14 +227,27 @@ void LightApp_Module::update( const int theFlags ) if ( SUIT_ViewManager* viewMgr = getApp()->activeViewManager() ) if ( SUIT_ViewWindow* viewWnd = viewMgr->getActiveView() ) { +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT if ( viewWnd->inherits( "SVTK_ViewWindow" ) ) ( (SVTK_ViewWindow*)viewWnd )->Repaint(); - else if ( viewWnd->inherits( "OCCViewer_ViewWindow" ) ) +#else + if ( viewWnd->inherits( "VTKViewer_ViewWindow" ) ) + ( (VTKViewer_ViewWindow*)viewWnd )->Repaint(); +#endif +#endif +#ifndef DISABLE_OCCVIEWER + if ( viewWnd->inherits( "OCCViewer_ViewWindow" ) ) ( (OCCViewer_ViewWindow*)viewWnd )->getViewPort()->onUpdate(); - else if ( viewWnd->inherits( "Plot2d_ViewWindow" ) ) +#endif +#ifndef DISABLE_PLOT2DVIEWER + if ( viewWnd->inherits( "Plot2d_ViewWindow" ) ) ( (Plot2d_ViewWindow*)viewWnd )->getViewFrame()->Repaint(); - else if ( viewWnd->inherits( "GLViewer_ViewFrame" ) ) +#endif +#ifndef DISABLE_GLVIEWER + if ( viewWnd->inherits( "GLViewer_ViewFrame" ) ) ( (GLViewer_ViewFrame*)viewWnd )->getViewPort()->onUpdate(); +#endif } } } @@ -290,9 +324,40 @@ QtxPopupMgr* LightApp_Module::popupMgr() myPopupMgr->setRule( disp, /*QString( "( not isVisible ) and " ) + */ uniform, true ); myPopupMgr->setRule( erase, /*QString( "( isVisible ) and " ) + */ uniform, true ); myPopupMgr->setRule( dispOnly, uniform, true ); - QString viewers = "{ '%1' '%2' '%3' }"; - viewers = viewers.arg( SOCC_Viewer::Type() ).arg( SVTK_Viewer::Type() ).arg( SPlot2d_Viewer::Type() ); - myPopupMgr->setRule( eraseAll, QString( "client in %1" ).arg( viewers ), true ); + + QStringList viewers; + +#ifndef DISABLE_OCCVIEWER +#ifndef DISABLE_SALOMEOBJECT + viewers.append( SOCC_Viewer::Type() ); +#else + viewers.append( OCCViewer_Viewer::Type() ); +#endif +#endif +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT + viewers.append( SVTK_Viewer::Type() ); +#else + viewers.append( VTKViewer_Viewer::Type() ); +#endif +#endif +#ifndef DISABLE_PLOT2DVIEWER +#ifndef DISABLE_SALOMEOBJECT + viewers.append( SPlot2d_Viewer::Type() ); +#else + viewers.append( Plot2d_Viewer::Type() ); +#endif +#endif + + if( !viewers.isEmpty() ) + { + QString strViewers = "{ ", temp = "'%1' "; + QStringList::const_iterator anIt = viewers.begin(), aLast = viewers.end(); + for( ; anIt!=aLast; anIt++ ) + strViewers+=temp.arg( *anIt ); + strViewers+="}"; + myPopupMgr->setRule( eraseAll, QString( "client in %1" ).arg( strViewers ), true ); + } } return myPopupMgr; } diff --git a/src/LightApp/LightApp_OBSelector.cxx b/src/LightApp/LightApp_OBSelector.cxx index ebe8571b4..22867b5f6 100644 --- a/src/LightApp/LightApp_OBSelector.cxx +++ b/src/LightApp/LightApp_OBSelector.cxx @@ -71,9 +71,13 @@ void LightApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const LightApp_DataObject* obj = dynamic_cast( it.current() ); if ( obj ) { +#ifndef DISABLE_SALOMEOBJECT Handle(SALOME_InteractiveObject) aSObj = new SALOME_InteractiveObject ( obj->entry(), obj->componentDataType(), obj->name() ); LightApp_DataOwner* owner = new LightApp_DataOwner( aSObj ); +#else + LightApp_DataOwner* owner = new LightApp_DataOwner( obj->entry() ); +#endif that->mySelectedList.append( SUIT_DataOwnerPtr( owner ) ); } } diff --git a/src/LightApp/LightApp_OCCSelector.cxx b/src/LightApp/LightApp_OCCSelector.cxx index d0b07bb7b..abd30415a 100644 --- a/src/LightApp/LightApp_OCCSelector.cxx +++ b/src/LightApp/LightApp_OCCSelector.cxx @@ -20,8 +20,9 @@ #include "LightApp_DataOwner.h" #include "LightApp_OCCSelector.h" -#include - +#ifndef DISABLE_SALOMEOBJECT + #include +#endif #include #include @@ -68,9 +69,13 @@ void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const for ( AIS_ListIteratorOfListOfInteractive anIt( aSelList ); anIt.More(); anIt.Next() ) if ( !anIt.Value().IsNull() ) { +#ifndef DISABLE_SALOMEOBJECT Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anIt.Value()->GetOwner()); if( !anObj.IsNull() ) aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( anObj ) ) ); +#else + aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( entry( anIt.Value() ) ) ) ); +#endif } } @@ -112,10 +117,13 @@ QString LightApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS if ( anAIS.IsNull() || !anAIS->HasOwner() ) return QString::null; - Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anAIS->GetOwner()); - QString res; + +#ifndef DISABLE_SALOMEOBJECT + Handle(SALOME_InteractiveObject) anObj = Handle(SALOME_InteractiveObject)::DownCast(anAIS->GetOwner()); if ( !anObj.IsNull() ) res = QString( anObj->getEntry() ); +#endif + return res; } diff --git a/src/LightApp/LightApp_SelectionMgr.cxx b/src/LightApp/LightApp_SelectionMgr.cxx index ab7a4f8b1..a46e906c0 100644 --- a/src/LightApp/LightApp_SelectionMgr.cxx +++ b/src/LightApp/LightApp_SelectionMgr.cxx @@ -25,13 +25,15 @@ #include -#include -#include +#ifndef DISABLE_SALOMEOBJECT + #include + #include -// Open CASCADE Include -#include -#include -#include + // Open CASCADE Include + #include + #include + #include +#endif /*! Constructor. @@ -57,6 +59,7 @@ LightApp_Application* LightApp_SelectionMgr::application() const return myApp; } +#ifndef DISABLE_SALOMEOBJECT /*! Get all selected objects from selection manager */ @@ -117,6 +120,37 @@ void LightApp_SelectionMgr::setSelectedObjects( const SALOME_ListIO& lst, const setSelected( owners, append ); } +#else +/*! + Get all selected objects from selection manager +*/ +void LightApp_SelectionMgr::selectedObjects( QStringList& theList, const QString& theType, + const bool convertReferences ) const +{ + theList.clear(); + + SUIT_DataOwnerPtrList aList; + selected( aList, theType ); + + QString entry; + for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr ) + { + const LightApp_DataOwner* owner = dynamic_cast( (*itr).operator->() ); + if( !owner ) + continue; + + LightApp_Study* study = dynamic_cast( application()->activeStudy() ); + if ( !study ) + return; + + entry = owner->entry(); + if( !theList.contains( entry ) ) + theList.append( entry ); + } +} + +#endif + /*! Emit current selection changed. */ @@ -127,6 +161,8 @@ void LightApp_SelectionMgr::selectionChanged( SUIT_Selector* theSel ) emit currentSelectionChanged(); } +#ifndef DISABLE_SALOMEOBJECT + /*! get map of indexes for the given SALOME_InteractiveObject */ @@ -287,3 +323,5 @@ void LightApp_SelectionMgr::selectedSubOwners( MapEntryOfMapOfInteger& theMap ) } } } + +#endif diff --git a/src/LightApp/LightApp_SelectionMgr.h b/src/LightApp/LightApp_SelectionMgr.h index c063b82be..8546dadfe 100644 --- a/src/LightApp/LightApp_SelectionMgr.h +++ b/src/LightApp/LightApp_SelectionMgr.h @@ -22,14 +22,19 @@ #include "LightApp.h" #include -#include -#include +#ifndef DISABLE_SALOMEOBJECT + #include + #include + + class SALOME_ListIO; + class TColStd_IndexedMapOfInteger; + class TColStd_MapOfInteger; +#else +#include +#endif -class SALOME_ListIO; class LightApp_Application; -class TColStd_IndexedMapOfInteger; -class TColStd_MapOfInteger; class LIGHTAPP_EXPORT LightApp_SelectionMgr : public SUIT_SelectionMgr { @@ -39,11 +44,12 @@ public: LightApp_SelectionMgr( LightApp_Application*, const bool = true ); virtual ~LightApp_SelectionMgr(); + LightApp_Application* application() const; + +#ifndef DISABLE_SALOMEOBJECT typedef QMap< Handle(SALOME_InteractiveObject), TColStd_IndexedMapOfInteger > MapIOOfMapOfInteger; typedef QMap< QString, TColStd_IndexedMapOfInteger > MapEntryOfMapOfInteger; - LightApp_Application* application() const; - void selectedObjects( SALOME_ListIO&, const QString& = QString::null, const bool = true ) const; void setSelectedObjects( const SALOME_ListIO&, const bool = false ); @@ -61,6 +67,9 @@ public: void selectObjects( MapIOOfMapOfInteger theMapIO, bool append ); void selectedSubOwners( MapEntryOfMapOfInteger& theMap ); +#else + void selectedObjects( QStringList&, const QString& = QString::null, const bool = true ) const; +#endif signals: void currentSelectionChanged(); diff --git a/src/LightApp/LightApp_ShowHideOp.cxx b/src/LightApp/LightApp_ShowHideOp.cxx index 52f16266f..76827c053 100644 --- a/src/LightApp/LightApp_ShowHideOp.cxx +++ b/src/LightApp/LightApp_ShowHideOp.cxx @@ -28,8 +28,10 @@ #include "LightApp_SelectionMgr.h" #include "LightApp_Selection.h" -#include -#include +#ifndef DISABLE_SALOMEOBJECT + #include + #include +#endif LightApp_ShowHideOp::LightApp_ShowHideOp( ActionType type ) : LightApp_Operation(), @@ -95,21 +97,33 @@ void LightApp_ShowHideOp::startOperation() } } + QStringList entries; + +#ifndef DISABLE_SALOMEOBJECT SALOME_ListIO selObjs; mgr->selectedObjects( selObjs ); - - QStringList entries; SALOME_ListIteratorOfListIO anIt( selObjs ); for( ; anIt.More(); anIt.Next() ) - { - if( anIt.Value().IsNull() ) - continue; + if( !anIt.Value().IsNull() ) +#else + QStringList selObjs; + mgr->selectedObjects( selObjs ); + QStringList::const_iterator anIt = selObjs.begin(), aLast = selObjs.end(); + for( ; ; anIt!=aLast ) +#endif + { + QString entry = +#ifndef DISABLE_SALOMEOBJECT + anIt.Value()->getEntry(); +#else + *anIt; +#endif - if( study->isComponent( anIt.Value()->getEntry() ) ) - study->children( anIt.Value()->getEntry(), entries ); - else - entries.append( anIt.Value()->getEntry() ); - } + if( study->isComponent( entry ) ) + study->children( entry, entries ); + else + entries.append( entry ); + } for( QStringList::const_iterator it = entries.begin(), last = entries.end(); it!=last; it++ ) { diff --git a/src/LightApp/LightApp_VTKSelector.cxx b/src/LightApp/LightApp_VTKSelector.cxx index b393b3043..a81891b59 100644 --- a/src/LightApp/LightApp_VTKSelector.cxx +++ b/src/LightApp/LightApp_VTKSelector.cxx @@ -19,18 +19,24 @@ #include "LightApp_VTKSelector.h" #include "LightApp_DataOwner.h" -#include "SVTK_ViewModelBase.h" -#include "SVTK_Selector.h" -#include "SVTK_ViewWindow.h" -#include "SVTK_Functor.h" +#ifndef DISABLE_VTKVIEWER + #include "SVTK_ViewModelBase.h" + #include "SVTK_Selector.h" + #include "SVTK_ViewWindow.h" + #include "SVTK_Functor.h" + #include "VTKViewer_Algorithm.h" + #include +#endif -#include "SALOME_Actor.h" -#include "SALOME_ListIteratorOfListIO.hxx" +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_Actor.h" + #include "SALOME_ListIteratorOfListIO.hxx" +#endif -#include "VTKViewer_Algorithm.h" -#include +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT /*! Constructor. */ @@ -45,6 +51,7 @@ LightApp_SVTKDataOwner { myIds = theIds; // workaround - there is no constructor copy for the container } +#endif /*! Destuctor. @@ -64,6 +71,10 @@ LightApp_SVTKDataOwner return myActor.GetPointer(); } +#endif + + +#ifndef DISABLE_VTKVIEWER /*! Constructor. */ @@ -105,6 +116,7 @@ LightApp_VTKSelector return myViewer->getType(); } +#endif /*! On selection changed. */ @@ -115,6 +127,8 @@ LightApp_VTKSelector selectionChanged(); } +#ifndef DISABLE_VTKVIEWER + /*! Gets list of selected data owners.(output \a aList). */ @@ -204,3 +218,5 @@ LightApp_VTKSelector } } } + +#endif diff --git a/src/LightApp/LightApp_VTKSelector.h b/src/LightApp/LightApp_VTKSelector.h index 14c6523ce..7c5dca73f 100644 --- a/src/LightApp/LightApp_VTKSelector.h +++ b/src/LightApp/LightApp_VTKSelector.h @@ -19,20 +19,20 @@ #ifndef LIGHTAPP_VTKSELECTOR_H #define LIGHTAPP_VTKSELECTOR_H -#include - -#include - #include "SUIT_Selector.h" - #include "LightApp.h" #include "LightApp_DataOwner.h" -#include "SVTK_Selection.h" -#include "SALOME_InteractiveObject.hxx" - -class SALOME_Actor; -class SVTK_ViewModelBase; +#ifndef DISABLE_VTKVIEWER + #include + #include + #include "SVTK_Selection.h" +#ifndef DISABLE_SALOMEOBJECT + #include "SALOME_InteractiveObject.hxx" +#endif + class SALOME_Actor; + class SVTK_ViewModelBase; +#endif /*! Provide salome vtk data owner list. @@ -40,10 +40,13 @@ class SVTK_ViewModelBase; class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner { public: +#ifndef DISABLE_VTKVIEWER + #ifndef DISABLE_SALOMEOBJECT LightApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO, const TColStd_IndexedMapOfInteger& theIds, Selection_Mode theMode = ActorSelection, SALOME_Actor* theActor = NULL); + #endif virtual ~LightApp_SVTKDataOwner(); /*!Gets dataowners ids list.*/ @@ -64,6 +67,9 @@ class LIGHTAPP_EXPORT LightApp_SVTKDataOwner : public LightApp_DataOwner TColStd_IndexedMapOfInteger myIds; Selection_Mode mySelectionMode; vtkSmartPointer myActor; +#else + LightApp_SVTKDataOwner( const QString& ); +#endif }; @@ -75,22 +81,29 @@ class LIGHTAPP_EXPORT LightApp_VTKSelector : public SUIT_Selector Q_OBJECT; public: +#ifndef DISABLE_VTKVIEWER LightApp_VTKSelector( SVTK_ViewModelBase*, SUIT_SelectionMgr* ); virtual ~LightApp_VTKSelector(); SVTK_ViewModelBase* viewer() const; virtual QString type() const; +#else + LightApp_VTKSelector( SUIT_SelectionMgr* ); +#endif private slots: void onSelectionChanged(); +#ifndef DISABLE_VTKVIEWER protected: virtual void getSelection( SUIT_DataOwnerPtrList& ) const; virtual void setSelection( const SUIT_DataOwnerPtrList& ); private: SVTK_ViewModelBase* myViewer; + +#endif }; #endif diff --git a/src/LightApp/Makefile.in b/src/LightApp/Makefile.in index 3ffef0449..fc43d9593 100755 --- a/src/LightApp/Makefile.in +++ b/src/LightApp/Makefile.in @@ -22,13 +22,11 @@ EXPORT_HEADERS= LightApp.h \ LightApp_Dialog.h \ LightApp_Displayer.h \ LightApp_Driver.h \ - LightApp_GLSelector.h \ LightApp_Module.h \ LightApp_ModuleDlg.h \ LightApp_NameDlg.h \ LightApp_OBFilter.h \ LightApp_OBSelector.h \ - LightApp_OCCSelector.h \ LightApp_Operation.h \ LightApp_Selection.h \ LightApp_SelectionMgr.h \ @@ -39,10 +37,21 @@ EXPORT_HEADERS= LightApp.h \ LightApp_PreferencesDlg.h \ LightApp_RootObject.h \ LightApp_UpdateFlags.h \ - LightApp_VTKSelector.h \ LightApp_WidgetContainer.h # LightApp_HDFDriver.h \ +ifneq ($(DISABLE_VTKVIEWER),yes) +ifneq ($(DISABLE_SALOMEOBJECT),yes) + EXPORT_HEADERS+= LightApp_VTKSelector.h +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + EXPORT_HEADERS+= LightApp_OCCSelector.h +endif +ifneq ($(DISABLE_GLVIEWER),yes) + EXPORT_HEADERS+= LightApp_GLSelector.h +endif + # .po files to transform in .qm PO_FILES = LightApp_images.po \ LightApp_msg_en.po @@ -59,13 +68,11 @@ LIB_SRC= LightApp_AboutDlg.cxx \ LightApp_Dialog.cxx \ LightApp_Displayer.cxx \ LightApp_Driver.cxx \ - LightApp_GLSelector.cxx \ LightApp_Module.cxx \ LightApp_ModuleDlg.cxx \ LightApp_NameDlg.cxx \ LightApp_OBFilter.cxx \ LightApp_OBSelector.cxx \ - LightApp_OCCSelector.cxx \ LightApp_Operation.cxx \ LightApp_Selection.cxx \ LightApp_SelectionMgr.cxx \ @@ -74,17 +81,26 @@ LIB_SRC= LightApp_AboutDlg.cxx \ LightApp_SwitchOp.cxx \ LightApp_Preferences.cxx \ LightApp_PreferencesDlg.cxx \ - LightApp_VTKSelector.cxx \ LightApp_WidgetContainer.cxx # LightApp_HDFDriver.cxx \ +ifneq ($(DISABLE_VTKVIEWER),yes) +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIB_SRC+= LightApp_VTKSelector.cxx +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + LIB_SRC+= LightApp_OCCSelector.cxx +endif +ifneq ($(DISABLE_GLVIEWER),yes) + LIB_SRC+= LightApp_GLSelector.cxx +endif + LIB_MOC = LightApp_AboutDlg.h \ LightApp_Application.h \ LightApp_DataModel.h \ LightApp_Dialog.h \ - LightApp_GLSelector.h \ LightApp_OBSelector.h \ - LightApp_OCCSelector.h \ LightApp_Operation.h \ LightApp_Module.h \ LightApp_ModuleDlg.h \ @@ -95,9 +111,20 @@ LIB_MOC = LightApp_AboutDlg.h \ LightApp_SwitchOp.h \ LightApp_Preferences.h \ LightApp_PreferencesDlg.h \ - LightApp_VTKSelector.h \ LightApp_WidgetContainer.h +ifneq ($(DISABLE_VTKVIEWER),yes) +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIB_MOC+= LightApp_VTKSelector.h +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + LIB_MOC+= LightApp_OCCSelector.h +endif +ifneq ($(DISABLE_GLVIEWER),yes) + LIB_MOC+= LightApp_GLSelector.h +endif + RESOURCES_FILES = icon_about.png \ icon_applogo.png \ icon_default.png \ @@ -107,11 +134,73 @@ RESOURCES_FILES = icon_about.png \ LightApp.ini \ LightApp.xml -CPPFLAGS+=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(QWT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) +CPPFLAGS+=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(OCC_INCLUDES) #$(HDF5_INCLUDES) -LDFLAGS+=$(PYTHON_LIBS) $(QT_MT_LIBS) -LIBS+= -lsuit -lstd -lCAM -lObjBrowser -lLogWindow $(CAS_KERNEL) -lGLViewer -lOCCViewer -lVTKViewer -lSalomeObject -lSOCC -lSVTK -lSPlot2d -lSUPERVGraph -lPyInterp -lPythonConsole +ifneq ($(DISABLE_VTKVIEWER),yes) + CPPFLAGS+= $(VTK_INCLUDES) +else + CPPFLAGS+= -DDISABLE_VTKVIEWER +endif +ifneq ($(DISABLE_PLOT2DVIEWER),yes) + CPPFLAGS+= $(QWT_INCLUDES) +else + CPPFLAGS+= -DDISABLE_PLOT2DVIEWER +endif +ifeq ($(DISABLE_OCCVIEWER),yes) + CPPFLAGS+= -DDISABLE_OCCVIEWER +endif +ifneq ($(DISABLE_PYCONSOLE),yes) + CPPFLAGS+= $(PYTHON_INCLUDES) +else + CPPFLAGS+= -DDISABLE_PYCONSOLE +endif +ifeq ($(DISABLE_GLVIEWER),yes) + CPPFLAGS+= -DDISABLE_GLVIEWER +endif +ifeq ($(DISABLE_SUPERVGRAPHVIEWER),yes) + CPPFLAGS+= -DDISABLE_SUPERVGRAPHVIEWER +endif +ifeq ($(DISABLE_SALOMEOBJECT),yes) + CPPFLAGS+= -DDISABLE_SALOMEOBJECT +endif + +LDFLAGS+=$(QT_MT_LIBS) +ifneq ($(DISABLE_PYCONSOLE),yes) + LDFLAGS+= $(PYTHON_LIBS) +endif + +LIBS+= -lsuit -lstd -lCAM -lObjBrowser -lLogWindow $(CAS_KERNEL) -lSalomePrs #$(HDF5_LIBS) -lSalomeHDFPersistCopy +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIBS+= -lSalomeObject +endif +ifneq ($(DISABLE_VTKVIEWER),yes) + LIBS+= -lVTKViewer +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIBS+= -lSVTK +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + LIBS+= -lOCCViewer +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIBS+= -lSOCC +endif +endif +ifneq ($(DISABLE_GLVIEWER),yes) + LIBS+= -lGLViewer +endif +ifneq ($(DISABLE_PLOT2DVIEWER),yes) + LIBS+= -lPlot2d +ifneq ($(DISABLE_SALOMEOBJECT),yes) + LIBS+= -lSPlot2d +endif +endif +ifneq ($(DISABLE_PYCONSOLE),yes) + LIBS+= -lPyInterp -lPythonConsole +endif +ifneq ($(DISABLE_SUPERVGRAPHVIEWER),yes) + LIBS+= -lSUPERVGraph +endif @CONCLUDE@ diff --git a/src/Makefile.in b/src/Makefile.in index 332907b5c..861e9d4b9 100755 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -32,9 +32,46 @@ VPATH=.:@srcdir@ @COMMENCE@ -SUBDIRS = Qtx DDS QDS SUIT STD CAF CAM SUITApp VTKViewer OCCViewer GLViewer \ - LogWindow Event OBJECT Prs PyInterp PythonConsole ObjBrowser \ - RegistryDisplay Plot2d TOOLSGUI SOCC SVTK SPlot2d SUPERVGraph \ - LightApp Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT Style ResExporter +SUBDIRS = Qtx DDS QDS SUIT STD CAF CAM SUITApp LogWindow ObjBrowser Prs + +ifneq ($(DISABLE_SALOMEOBJECT),yes) + SUBDIRS += OBJECT +endif + +ifneq ($(DISABLE_GLVIEWER),yes) + SUBDIRS += GLViewer +endif + +ifneq ($(DISABLE_VTKVIEWER),yes) + SUBDIRS += VTKViewer +ifneq ($(DISABLE_SALOMEOBJECT),yes) + SUBDIRS += SVTK +endif +endif +ifneq ($(DISABLE_OCCVIEWER),yes) + SUBDIRS += OCCViewer +ifneq ($(DISABLE_SALOMEOBJECT),yes) + SUBDIRS += SOCC +endif +endif +ifneq ($(DISABLE_PYCONSOLE),yes) + SUBDIRS += PyInterp PythonConsole +endif +ifneq ($(DISABLE_PLOT2DVIEWER),yes) + SUBDIRS += Plot2d +ifneq ($(DISABLE_SALOMEOBJECT),yes) + SUBDIRS += SPlot2d +endif +endif +ifneq ($(DISABLE_SUPERVGRAPHVIEWER),yes) + SUBDIRS += SUPERVGraph +endif +SUBDIRS += LightApp Style ResExporter + +ifneq ($(GUI_DISABLE_CORBA),yes) + SUBDIRS += RegistryDisplay TOOLSGUI \ + Event Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT +endif + @MODULE@ diff --git a/src/OBJECT/Makefile.in b/src/OBJECT/Makefile.in index 0fb5e50a7..9171c05f6 100755 --- a/src/OBJECT/Makefile.in +++ b/src/OBJECT/Makefile.in @@ -9,7 +9,6 @@ VPATH=.:@srcdir@:@top_srcdir@/idl EXPORT_HEADERS = SALOME_InteractiveObject.hxx \ Handle_SALOME_InteractiveObject.hxx \ - SALOME_GLOwner.h \ SALOME_AISShape.hxx \ Handle_SALOME_AISShape.hxx \ SALOME_AISObject.hxx \ @@ -32,7 +31,6 @@ EXPORT_HEADERS = SALOME_InteractiveObject.hxx \ LIB = libSalomeObject.la LIB_SRC = SALOME_InteractiveObject.cxx \ - SALOME_GLOwner.cxx \ SALOME_AISShape.cxx\ SALOME_AISObject.cxx\ SALOME_ListIO_0.cxx \ @@ -50,8 +48,8 @@ LIB_CLIENT_IDL = BIN = BIN_SRC = -CPPFLAGS+=$(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(QT_INCLUDES) $(OGL_INCLUDES) -LDFLAGS+= $(PYTHON_LIBS) $(VTK_LIBS) $(QT_LIBS) $(OGL_LIBS) $(CAS_LDPATH) -lTKV3d -lVTKViewer -lsuit +CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) +LDFLAGS+= $(QT_LIBS) $(CAS_LDPATH) -lTKV3d @CONCLUDE@ diff --git a/src/OBJECT/SALOME_GLOwner.cxx b/src/OBJECT/SALOME_GLOwner.cxx deleted file mode 100644 index ed88afb38..000000000 --- a/src/OBJECT/SALOME_GLOwner.cxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D -// -// 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/ -// - -#include - -SALOME_GLOwner::SALOME_GLOwner( const char* entry ) -: GLViewer_Owner() -{ - setEntry( entry ); -} - -SALOME_GLOwner::~SALOME_GLOwner() -{ -} - -const char* SALOME_GLOwner::entry() const -{ - return myEntry.c_str(); -} - -void SALOME_GLOwner::setEntry( const char* entry ) -{ - myEntry = entry; -} diff --git a/src/OBJECT/SALOME_GLOwner.h b/src/OBJECT/SALOME_GLOwner.h deleted file mode 100644 index 770911392..000000000 --- a/src/OBJECT/SALOME_GLOwner.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D -// -// 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/ -// -#ifndef SALOME_GLOWNER_H -#define SALOME_GLOWNER_H - -#include -//#include -#include - -#ifdef WNT -#define SALOME_OBJECT_EXPORT __declspec (dllexport) -#else -#define SALOME_OBJECT_EXPORT -#endif - -class SALOME_OBJECT_EXPORT SALOME_GLOwner : public GLViewer_Owner -{ -public: - SALOME_GLOwner( const char* ); - ~SALOME_GLOwner(); - - const char* entry() const; - void setEntry( const char* ); - -private: - std::string myEntry; -}; - -#endif diff --git a/src/SPlot2d/Makefile.in b/src/SPlot2d/Makefile.in index d0a8d1604..44334e80b 100644 --- a/src/SPlot2d/Makefile.in +++ b/src/SPlot2d/Makefile.in @@ -39,8 +39,8 @@ LIB_MOC = \ # SALOME_GenericObj.idl #CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(OGL_INCLUDES) $(PYTHON_INCLUDES) $(QWT_INCLUDES) $(BOOST_CPPFLAGS) -I$(KERNEL_ROOT_DIR)/include/salome -CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(QWT_INCLUDES) $(BOOST_CPPFLAGS) -I$(KERNEL_ROOT_DIR)/include/salome -LDFLAGS+=$(QT_MT_LIBS) $(QWT_LIBS) -L$(KERNEL_ROOT_DIR)/lib/salome -lsuit -lPlot2d -lSalomePrs +CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(QWT_INCLUDES) $(BOOST_CPPFLAGS) +LDFLAGS+=$(QT_MT_LIBS) $(QWT_LIBS) -lsuit -lPlot2d -lSalomePrs @CONCLUDE@ diff --git a/src/SUPERVGraph/Makefile.in b/src/SUPERVGraph/Makefile.in index 149feb93f..533fc020c 100755 --- a/src/SUPERVGraph/Makefile.in +++ b/src/SUPERVGraph/Makefile.in @@ -34,7 +34,7 @@ RESOURCES_FILES = view_pan.png \ LIB_CLIENT_IDL = -CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) -I${KERNEL_ROOT_DIR}/include/salome +CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) LDFLAGS+=$(QT_MT_LIBS) -L$(top_builddir)/lib -- 2.39.2