From 2f00da15280d837f614af0ad848cea1cba83bc02 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 6 Mar 2013 13:56:19 +0000 Subject: [PATCH] Merge from V6_main 06/03/2013 --- .../cmake_files/deprecated/FindOPENGL.cmake | 9 +++++-- src/GuiHelpers/CMakeLists.txt | 2 +- src/Plot2d/CMakeLists.txt | 2 +- src/Qtx/QtxWebBrowser.cxx | 26 ++++++++++++------- src/QxGraph/CMakeLists.txt | 2 +- src/QxScene/CMakeLists.txt | 2 +- src/SALOME_PY/CMakeLists.txt | 2 +- .../SALOME_PYQT_GUI/CMakeLists.txt | 2 +- .../SALOME_PYQT_GUILight/CMakeLists.txt | 2 +- src/SALOME_PYQT/SalomePyQt/CMakeLists.txt | 2 +- src/SALOME_SWIG/CMakeLists.txt | 2 +- src/SOCC/CMakeLists.txt | 2 +- src/SPlot2d/CMakeLists.txt | 2 +- src/SUPERVGraph/CMakeLists.txt | 2 +- src/SVTK/CMakeLists.txt | 2 +- src/SalomeApp/CMakeLists.txt | 2 +- src/Session/CMakeLists.txt | 2 +- src/TOOLSGUI/CMakeLists.txt | 2 +- src/TreeData/CMakeLists.txt | 2 +- 19 files changed, 40 insertions(+), 29 deletions(-) diff --git a/adm_local/cmake_files/deprecated/FindOPENGL.cmake b/adm_local/cmake_files/deprecated/FindOPENGL.cmake index d7e8d4fed..794f641cc 100644 --- a/adm_local/cmake_files/deprecated/FindOPENGL.cmake +++ b/adm_local/cmake_files/deprecated/FindOPENGL.cmake @@ -18,8 +18,13 @@ # IF(${WINDOWS}) - FIND_LIBRARY(OpenGL_LIB OpenGL32 "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib") - FIND_LIBRARY(GlU_LIB GlU32 "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib") + IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") # if platform is Windows 64 bit + FIND_LIBRARY(OpenGL_LIB OpenGL32 HINTS "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib/x64") + FIND_LIBRARY(GlU_LIB GlU32 HINTS "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib/x64") + ELSE("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + FIND_LIBRARY(OpenGL_LIB OpenGL32 "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib") + FIND_LIBRARY(GlU_LIB GlU32 "C:/Program Files/Microsoft SDKs/Windows/v6.0A/lib") + ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") ELSE(${WINDOWS}) FIND_LIBRARY(OpenGL_LIB GL) FIND_LIBRARY(GlU_LIB GLU) diff --git a/src/GuiHelpers/CMakeLists.txt b/src/GuiHelpers/CMakeLists.txt index faddd19a4..a8c80967e 100755 --- a/src/GuiHelpers/CMakeLists.txt +++ b/src/GuiHelpers/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome diff --git a/src/Plot2d/CMakeLists.txt b/src/Plot2d/CMakeLists.txt index 713a2713f..4531a5e0c 100755 --- a/src/Plot2d/CMakeLists.txt +++ b/src/Plot2d/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${QWT_INCLUDE_DIR} ${QT_INCLUDES} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx diff --git a/src/Qtx/QtxWebBrowser.cxx b/src/Qtx/QtxWebBrowser.cxx index 119c012d7..d49d08f18 100644 --- a/src/Qtx/QtxWebBrowser.cxx +++ b/src/Qtx/QtxWebBrowser.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -399,27 +400,32 @@ void QtxWebBrowser::linkClicked( const QUrl& url ) if ( url.scheme() == "file" ) { QString filename = url.toLocalFile(); if ( QFileInfo( filename ).suffix().toLower() == "pdf" ) { + int i = -1; #ifdef WIN32 - ::system( QString( "start %2" ).arg( filename ).toLatin1().constData() ); + i = ::system( QString( "start %2" ).arg( filename ).toLatin1().constData() ); #else // special processing of PDF files QStringList readers; - readers << "xdg-open" << "acroread" << "kpdf" << "kghostview" << "xpdf"; - int i; + readers << "xdg-open" << "acroread"<< "okular" << "evince" << "kpdf" << "kghostview" << "xpdf"; foreach ( QString r, readers ) { QString reader = QString( "/usr/bin/%1" ).arg( r ); if ( QFileInfo( reader ).exists() ) { - i = ::system( QString( "%1 %2" ).arg( reader ).arg( url.toLocalFile() ).toLatin1().constData() ); - // If Salome Qt version is lower than the system one, on KDE an unresolved symbol is raised - // In this case, we try to launch the pdf viewer after unsetting the LD_LIBRARY_PATH environnement variable // Warning: the test on the return value of ::system does not work if the command ends with '&' - if (i != 0) - i = ::system( QString( "unset LD_LIBRARY_PATH ; %1 %2" ).arg( reader ).arg( url.toLocalFile() ).toLatin1().constData() ); - if (i == 0) - break; + i = ::system( QString( "%1 %2" ).arg( reader ).arg( url.toLocalFile() ).toLatin1().constData() ); + if (i != 0) { + // If Salome Qt version is lower than the system one, on KDE an unresolved symbol is raised + // In this case, we can try to launch the pdf viewer after unsetting the LD_LIBRARY_PATH environnement variable + i = ::system( QString( "unset LD_LIBRARY_PATH ; %1 %2" ).arg( reader ).arg( url.toLocalFile() ).toLatin1().constData() ); + } + if (i == 0) { + break; + } } } #endif // WIN32 + if (i != 0) { + QMessageBox::warning(this, tr("Opening pdf file"), tr("Impossible to open the pdf file: no viewer found or compatible.")); + } } } myWebView->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks ); diff --git a/src/QxGraph/CMakeLists.txt b/src/QxGraph/CMakeLists.txt index 662cc5eef..18b25ba57 100755 --- a/src/QxGraph/CMakeLists.txt +++ b/src/QxGraph/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx diff --git a/src/QxScene/CMakeLists.txt b/src/QxScene/CMakeLists.txt index 59f4d468b..4923fa5f6 100755 --- a/src/QxScene/CMakeLists.txt +++ b/src/QxScene/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx diff --git a/src/SALOME_PY/CMakeLists.txt b/src/SALOME_PY/CMakeLists.txt index 6fe2ffc4e..799fe74a2 100755 --- a/src/SALOME_PY/CMakeLists.txt +++ b/src/SALOME_PY/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt index 40a9e8d25..fd5057149 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt @@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${SIP_INCLUDE_DIRS} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt index c4c80d4d3..abb02c164 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${SIP_INCLUDE_DIR} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} diff --git a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt index 441239a8c..112a17800 100755 --- a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt +++ b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${QWT_INCLUDE_DIR} ${SIP_INCLUDE_DIR} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} diff --git a/src/SALOME_SWIG/CMakeLists.txt b/src/SALOME_SWIG/CMakeLists.txt index 06bf37fec..5b98e9aae 100755 --- a/src/SALOME_SWIG/CMakeLists.txt +++ b/src/SALOME_SWIG/CMakeLists.txt @@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${QWT_INCLUDE_DIR} ${VTK_INCLUDE_DIRS} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/salome_adm diff --git a/src/SOCC/CMakeLists.txt b/src/SOCC/CMakeLists.txt index a111cf9a0..25725d2d3 100755 --- a/src/SOCC/CMakeLists.txt +++ b/src/SOCC/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT diff --git a/src/SPlot2d/CMakeLists.txt b/src/SPlot2d/CMakeLists.txt index 70f4c26c7..d2666caaf 100755 --- a/src/SPlot2d/CMakeLists.txt +++ b/src/SPlot2d/CMakeLists.txt @@ -20,7 +20,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${QWT_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome diff --git a/src/SUPERVGraph/CMakeLists.txt b/src/SUPERVGraph/CMakeLists.txt index 1140e6dad..e38341016 100755 --- a/src/SUPERVGraph/CMakeLists.txt +++ b/src/SUPERVGraph/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx diff --git a/src/SVTK/CMakeLists.txt b/src/SVTK/CMakeLists.txt index 90a85743e..5cad6454b 100755 --- a/src/SVTK/CMakeLists.txt +++ b/src/SVTK/CMakeLists.txt @@ -24,7 +24,7 @@ INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${VTK_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx diff --git a/src/SalomeApp/CMakeLists.txt b/src/SalomeApp/CMakeLists.txt index a7bdab445..ba95a0531 100755 --- a/src/SalomeApp/CMakeLists.txt +++ b/src/SalomeApp/CMakeLists.txt @@ -33,7 +33,7 @@ INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${VTK_INCLUDE_DIRS} ${QWT_INCLUDE_DIR} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} diff --git a/src/Session/CMakeLists.txt b/src/Session/CMakeLists.txt index 5e16543de..8f81cd9c7 100755 --- a/src/Session/CMakeLists.txt +++ b/src/Session/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES( ${LIBXML2_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} diff --git a/src/TOOLSGUI/CMakeLists.txt b/src/TOOLSGUI/CMakeLists.txt index 3be5ad58f..8a6b024c4 100755 --- a/src/TOOLSGUI/CMakeLists.txt +++ b/src/TOOLSGUI/CMakeLists.txt @@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${OMNIORB_INCLUDE_DIR} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl diff --git a/src/TreeData/CMakeLists.txt b/src/TreeData/CMakeLists.txt index 90eeae5d1..67854cef4 100755 --- a/src/TreeData/CMakeLists.txt +++ b/src/TreeData/CMakeLists.txt @@ -24,7 +24,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${OMNIORB_INCLUDE_DIR} - ${BOOST_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../SalomeApp -- 2.39.2