From 95d09d48a30f08befd46da420c02e9732891c743 Mon Sep 17 00:00:00 2001 From: bruneton Date: Tue, 2 Jul 2013 08:59:40 +0000 Subject: [PATCH] CMake: new CMake procedure for GUI. --- CMakeLists.txt | 373 +++++++++++------- adm_local/cmake_files/CMakeLists.txt | 14 +- adm_local/cmake_files/FindCAS.cmake | 172 +++++--- adm_local/cmake_files/FindPyQt4.cmake | 90 +++++ adm_local/cmake_files/FindQWT.cmake | 49 --- adm_local/cmake_files/FindQwt.cmake | 60 +++ adm_local/cmake_files/FindSIP.cmake | 43 ++ adm_local/cmake_files/FindSalomeCAS.cmake | 39 +- ...SalomeQWT.cmake => FindSalomeOpenGL.cmake} | 17 +- adm_local/cmake_files/FindSalomePYQT4.cmake | 40 -- ...dSalomeQT4.cmake => FindSalomePyQt4.cmake} | 23 +- adm_local/cmake_files/FindSalomeQt4.cmake | 27 ++ adm_local/cmake_files/FindSalomeQwt.cmake | 27 ++ adm_local/cmake_files/FindSalomeSIP.cmake | 17 +- adm_local/cmake_files/FindSalomeVTK.cmake | 43 +- .../cmake_files/SalomeGUIConfig.cmake.in | 119 ++++++ .../{UseQT4EXT.cmake => UseQt4Ext.cmake} | 0 .../cmake_files/deprecated/CMakeLists.txt | 2 +- bin/CMakeLists.txt | 4 +- idl/CMakeLists.txt | 6 +- src/CAF/CMakeLists.txt | 10 +- src/CAM/CMakeLists.txt | 10 +- src/CASCatch/CMakeLists.txt | 4 +- src/CMakeLists.txt | 4 +- src/DDS/CMakeLists.txt | 6 +- src/Event/CMakeLists.txt | 4 +- src/GLViewer/CMakeLists.txt | 10 +- src/GUI_PY/CMakeLists.txt | 4 +- src/GuiHelpers/CMakeLists.txt | 6 +- src/LightApp/CMakeLists.txt | 12 +- src/LogWindow/CMakeLists.txt | 8 +- src/OBJECT/CMakeLists.txt | 6 +- src/OCCViewer/CMakeLists.txt | 12 +- src/ObjBrowser/CMakeLists.txt | 8 +- src/OpenGLUtils/CMakeLists.txt | 6 +- src/Plot2d/CMakeLists.txt | 12 +- src/Prs/CMakeLists.txt | 4 +- src/PyConsole/CMakeLists.txt | 10 +- src/PyInterp/CMakeLists.txt | 8 +- src/QDS/CMakeLists.txt | 10 +- src/Qtx/CMakeLists.txt | 8 +- src/QxGraph/CMakeLists.txt | 12 +- src/QxScene/CMakeLists.txt | 12 +- src/ResExporter/CMakeLists.txt | 2 +- src/SALOME_PY/CMakeLists.txt | 8 +- src/SALOME_PYQT/CMakeLists.txt | 4 +- .../SALOME_PYQT_GUI/CMakeLists.txt | 6 +- .../SALOME_PYQT_GUILight/CMakeLists.txt | 12 +- src/SALOME_PYQT/SalomePyQt/CMakeLists.txt | 10 +- src/SALOME_SWIG/CMakeLists.txt | 12 +- src/SOCC/CMakeLists.txt | 6 +- src/SPlot2d/CMakeLists.txt | 6 +- src/STD/CMakeLists.txt | 12 +- src/SUIT/CMakeLists.txt | 10 +- src/SUITApp/CMakeLists.txt | 10 +- src/SUPERVGraph/CMakeLists.txt | 10 +- src/SVTK/CMakeLists.txt | 14 +- src/SalomeApp/CMakeLists.txt | 24 +- src/SalomeApp/Test/CMakeLists.txt | 12 +- src/SalomeApp/pluginsdemo/CMakeLists.txt | 2 +- src/Session/CMakeLists.txt | 8 +- src/Style/CMakeLists.txt | 12 +- src/TOOLSGUI/CMakeLists.txt | 10 +- src/TreeData/CMakeLists.txt | 8 +- src/TreeData/Test/CMakeLists.txt | 6 +- src/VTKViewer/CMakeLists.txt | 14 +- src/ViewerTools/CMakeLists.txt | 8 +- tools/dlgfactory/CMakeLists.txt | 2 +- tools/vtkEDFOverloads/CMakeLists.txt | 6 +- 69 files changed, 1016 insertions(+), 569 deletions(-) create mode 100644 adm_local/cmake_files/FindPyQt4.cmake delete mode 100644 adm_local/cmake_files/FindQWT.cmake create mode 100644 adm_local/cmake_files/FindQwt.cmake create mode 100644 adm_local/cmake_files/FindSIP.cmake rename adm_local/cmake_files/{FindSalomeQWT.cmake => FindSalomeOpenGL.cmake} (72%) delete mode 100644 adm_local/cmake_files/FindSalomePYQT4.cmake rename adm_local/cmake_files/{FindSalomeQT4.cmake => FindSalomePyQt4.cmake} (59%) create mode 100644 adm_local/cmake_files/FindSalomeQt4.cmake create mode 100644 adm_local/cmake_files/FindSalomeQwt.cmake create mode 100644 adm_local/cmake_files/SalomeGUIConfig.cmake.in rename adm_local/cmake_files/{UseQT4EXT.cmake => UseQt4Ext.cmake} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f302a1c2..d52d44683 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,161 +16,182 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -PROJECT(SALOME_GUI) - CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR) - -IF(COMMAND cmake_policy) - cmake_policy(SET CMP0003 NEW) -ENDIF(COMMAND cmake_policy) - -IF(APPLE) - SET(CMAKE_C_COMPILER gcc) - SET(CMAKE_CXX_COMPILER g++) - # because default is clang(llvm) with mountain lion at least -ENDIF(APPLE) - -# Temporary definitions -SET(DOXYGEN_IS_OK 0) -IF(WINDOWS) - SET(CPPUNIT_IS_OK 0) -ENDIF(WINDOWS) - -#Defining all options first -option(SALOME_USE_MPI "Use MPI containers" OFF) -option(SALOME_USE_CORBA "Use distribute application with components" ON) -option(SALOME_USE_DOC "Generate documentation" ON) -option(SALOME_USE_TEST "Generate test" OFF) -OPTION(SALOME_USE_VTKVIEWER "Enable VTK visualization (Mandatory in classic configurations)" ON) -OPTION(SALOME_USE_SALOMEOBJECT "Enable Salome Object (Mandatory in classic configurations)" ON) -OPTION(SALOME_USE_OCCVIEWER "Enable OCC visualization (Mandatory in classic configurations)" ON) -OPTION(SALOME_USE_GLVIEWER "Enable OpenGL visualization (Mandatory in classic configurations)" ON) -OPTION(SALOME_USE_PLOT2DVIEWER "Enable Plot2D visualization (Mandatory in classic configurations)" ON) -OPTION(SALOME_USE_PYCONSOLE "Enable Python GUI interface (Mandatory in classic configurations)" ON) -OPTION(SALOME_USE_SUPERVGRAPHVIEWER "Enable Supervision visualization (Mandatory in classic configurations)" ON) -OPTION(SALOME_USE_QXGRAPHVIEWER "Enable QX graph visualization (Mandatory in classic configurations)" ON) - -ENABLE_TESTING() -SET(VERSION "7.2.0") +PROJECT(SalomeGUI C CXX) + +# Ensure a proper linker behavior: +CMAKE_POLICY(SET CMP0003 NEW) + +#set(CMAKE_PREFIX_PATH "") +#set(_compo QtCore QtGui) +#find_package(Qt4 REQUIRED COMPONENTS _compo) + +# Versioning +# =========== +# Project name, upper case +STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) + +SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7) +SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) +SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) +SET(${PROJECT_NAME_UC}_VERSION + ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) +# Temporary backward compatibility: +SET(VERSION ${${PROJECT_NAME_UC}_VERSION}) SET(VERSION_DEV "0") -SET(BUILD_SHARED_LIBS true) - +# Find KERNEL +# =========== SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") IF(EXISTS ${KERNEL_ROOT_DIR}) - INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) + LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files") + INCLUDE(SalomeMacros) + FIND_PACKAGE(SalomeKERNEL REQUIRED) ELSE(EXISTS ${KERNEL_ROOT_DIR}) MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR") ENDIF(EXISTS ${KERNEL_ROOT_DIR}) -STRING(REPLACE "\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR}) - -# directories for packages detection -SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KERNEL_ROOT_DIR}/salome_adm/cmake_files ${CMAKE_SOURCE_DIR}/adm_local/cmake_files ${CMAKE_SOURCE_DIR}/adm_local/cmake_files/deprecated ) -find_package(PLATFORM) - - -# Threads -SET(CMAKE_THREAD_PREFER_PTHREAD) -find_package(Threads REQUIRED) - - -# required prerequisites from KERNEL - -find_package(SalomePYTHON) -find_package(SalomeSWIG) -find_package(SalomeLIBXML2) -find_package(SalomeHDF5) -find_package(SalomeBOOST) - -# required prerequisites for GUI - -find_package(SalomeQT4) -find_package(SalomeSIP) -find_package(SalomePYQT4) - -# optional prerequisites from KERNEL - -if(SALOME_USE_MPI OR HDF5_IS_PARALLEL) - find_package(SalomeMPI) -endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL) - -if(SALOME_USE_CORBA) - find_package(OMNIORB) -endif(SALOME_USE_CORBA) - -if(SALOME_USE_TEST) - find_package(SalomeCPPUNIT) -endif(SALOME_USE_TEST) - -if(SALOME_USE_DOC) - find_package(SalomeDOXYGEN) - find_package(SalomeSPHINX) -endif(SALOME_USE_DOC) - -if(SALOME_USE_LIBBATCH) - find_package(LIBBATCH) -endif(SALOME_USE_LIBBATCH) - - -# optional prerequisites for GUI - -if(SALOME_USE_OCCVIEWER) - find_package(SalomeCAS) -endif(SALOME_USE_OCCVIEWER) -if(SALOME_USE_GLVIEWER) - find_package(OpenGL REQUIRED) -endif(SALOME_USE_GLVIEWER) +# Platform setup +# ============== +INCLUDE(SalomeSetupPlatform) # From KERNEL +# Always build libraries as shared objects: +SET(BUILD_SHARED_LIBS TRUE) +# Local macros: +LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files") -if(SALOME_USE_VTKVIEWER) - find_package(SalomeVTK) -endif(SALOME_USE_VTKVIEWER) +# User options +# (some options have already been defined in KERNEL) +# ============ +OPTION(SALOME_USE_MPI "Use MPI containers" ${SALOME_USE_MPI}) +OPTION(SALOME_BUILD_DOC "Generate SALOME GUI documentation" ${SALOME_BUILD_DOC}) +OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ${SALOME_BUILD_TESTS}) -if(SALOME_USE_PLOT2DVIEWER) - find_package(SalomeQWT) -endif(SALOME_USE_PLOT2DVIEWER) +# Advanced options: +OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" ${SALOME_LIGHT_ONLY}) -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${VERSION} - OUTPUT_VARIABLE XVERSION) - -SET(GUI_salomebin_BINS bin/salome) - -SET(GUI_salomelib_LIBS lib/salome) -SET(GUI_paraviewlib_LIBS lib/paraview) - -SET(GUI_salomeinclude_HEADERS include/salome) - -SET(GUI_salomeres_DATA share/salome/resources/gui) - -SET(GUI_salomeres_SCRIPTS share/salome/resources/gui) - -SET(GUI_salomepluginsdir share/salome/plugins/gui) - -SET(GUI_salomescript_SCRIPTS bin/salome) - -SET(GUI_salomescript_DATA bin/salome) - -SET(GUI_salomescript_PYTHON bin/salome) -SET(KERNEL_salomescript_PYTHON ${GUI_salomescript_PYTHON}) - -SET(GUI_appliskel_SCRIPTS bin/salome/appliskel) - -SET(GUI_appliskel_PYTHON bin/salome/appliskel) - -SET(GUI_pythondir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) - -SET(GUI_salomepythondir ${GUI_pythondir}/salome) -SET(KERNEL_salomepythondir ${GUI_salomepythondir}) - -SET(GUI_sharedpkgpython_PYTHON ${GUI_salomepythondir}/shared_modules) - -SET(GUI_admlocalcmake adm_local/cmake_files) +OPTION(SALOME_USE_VTKVIEWER "Enable VTK visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_SALOMEOBJECT "Enable Salome Object (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_OCCVIEWER "Enable OCC visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_GLVIEWER "Enable OpenGL visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_PLOT2DVIEWER "Enable Plot2D visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_PYCONSOLE "Enable Python GUI interface (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_SUPERVGRAPHVIEWER "Enable Supervision visualization (Mandatory in classic configurations)" ON) +OPTION(SALOME_USE_QXGRAPHVIEWER "Enable QX graph visualization (Mandatory in classic configurations)" ON) -SET(IDLDIR) -IF(SALOME_USE_CORBA) +MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_USE_VTKVIEWER SALOME_USE_VTKVIEWER) +MARK_AS_ADVANCED(SALOME_USE_SALOMEOBJECT SALOME_USE_OCCVIEWER SALOME_USE_GLVIEWER SALOME_USE_PLOT2DVIEWER) +MARK_AS_ADVANCED(SALOME_USE_PYCONSOLE SALOME_USE_SUPERVGRAPHVIEWER SALOME_USE_QXGRAPHVIEWER) + +# Prerequisites +# ============= +# Find "big" prerequisites first - they reference themselves many others +# -> this can help finding the smaller prerequisites and detect conficts. +# In our case KERNEL has already loaded many prereq: + +## +## From KERNEL: +## + +# Various +FIND_PACKAGE(SalomePython REQUIRED) +FIND_PACKAGE(SalomePThread REQUIRED) +FIND_PACKAGE(SalomeSWIG REQUIRED) +FIND_PACKAGE(SalomeLibXml2 REQUIRED) +FIND_PACKAGE(SalomeBoost REQUIRED) +FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C) + +# Other KERNEL optionals: +IF(SALOME_USE_MPI) + FIND_PACKAGE(SalomeMPI REQUIRED) +ENDIF() +IF(NOT SALOME_LIGHT_ONLY) + FIND_PACKAGE(SalomeOmniORB REQUIRED) +ENDIF() +IF(SALOME_BUILD_TESTS) + ENABLE_TESTING() + FIND_PACKAGE(SalomeCppUnit REQUIRED) +ENDIF() +IF(SALOME_BUILD_DOC) + FIND_PACKAGE(SalomeDoxygen REQUIRED) + FIND_PACKAGE(SalomeGraphviz) # Remains optional even here. + FIND_PACKAGE(SalomeSphinx REQUIRED) +ENDIF() + +## +## GUI specifics +## + +FIND_PACKAGE(SalomeSIP REQUIRED) # should come after Python + +# Qt4 +FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebKit QtOpenGL) +INCLUDE(${QT_USE_FILE}) + +FIND_PACKAGE(SalomePyQt4 REQUIRED) + +# Optional prerequisites for GUI +IF(SALOME_USE_OCCVIEWER) + FIND_PACKAGE(SalomeCAS REQUIRED) +ENDIF() +IF(SALOME_USE_GLVIEWER) + FIND_PACKAGE(SalomeOpenGL REQUIRED) +ENDIF() +IF(SALOME_USE_VTKVIEWER) + # Required components are listed in the FindSalomeVTK.cmake file: + FIND_PACKAGE(SalomeVTK 6.0 REQUIRED) +ENDIF() +IF(SALOME_USE_PLOT2DVIEWER) + FIND_PACKAGE(SalomeQwt REQUIRED) +ENDIF() + +# Directories +# (default values taken from KERNEL) +# =========== +SET(SALOME_INSTALL_BINS "${SALOME_INSTALL_BINS}" CACHE PATH "Install path: SALOME binaries") +SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs") +SET(SALOME_INSTALL_IDLS "${SALOME_INSTALL_IDLS}" CACHE PATH "Install path: SALOME IDL files") +SET(SALOME_INSTALL_HEADERS "${SALOME_INSTALL_HEADERS}" CACHE PATH "Install path: SALOME headers") +SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH + "Install path: SALOME scripts") +SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH + "Install path: SALOME script data") +SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH + "Install path: SALOME Python scripts") +SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "${SALOME_INSTALL_APPLISKEL_SCRIPTS}" CACHE PATH + "Install path: SALOME application skeleton - scripts") +SET(SALOME_INSTALL_APPLISKEL_PYTHON "${SALOME_INSTALL_APPLISKEL_PYTHON}" CACHE PATH + "Install path: SALOME application skeleton - Python") +SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff") +SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH + "Install path: SALOME Python shared modules") +SET(SALOME_INSTALL_CMAKE "${SALOME_INSTALL_CMAKE}" CACHE PATH "Install path: SALOME CMake files") +SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH + "Install path: local SALOME CMake files") + +SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME resources") + +# Specific to GUI: +SET(SALOME_GUI_INSTALL_PARAVIEW_LIBS lib/paraview CACHE PATH + "Install path: SALOME GUI ParaView libraries") +SET(SALOME_GUI_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/gui" CACHE PATH + "Install path: SALOME GUI specific data") +SET(SALOME_GUI_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/gui" CACHE PATH + "Install path: SALOME GUI scripts") +SET(SALOME_GUI_INSTALL_PLUGINS share/salome/plugins/gui CACHE PATH + "Install path: SALOME GUI plugins") + +MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS) +MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME_INSTALL_SCRIPT_PYTHON) +MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE SALOME_INSTALL_CMAKE_LOCAL SALOME_INSTALL_RES) +MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED) +MARK_AS_ADVANCED(SALOME_GUI_INSTALL_PARAVIEW_LIBS SALOME_GUI_INSTALL_RES_DATA SALOME_GUI_INSTALL_RES_SCRIPTS SALOME_GUI_INSTALL_PLUGINS) + +# Sources +# ======== +IF(NOT SALOME_LIGHT_ONLY) SET(IDLDIR idl) -ENDIF(SALOME_USE_CORBA) +ENDIF() SET(SUBDIRS ${IDLDIR} @@ -179,14 +200,80 @@ SET(SUBDIRS src doc bin - tools -) + tools) + FOREACH(dir ${SUBDIRS}) ADD_SUBDIRECTORY(${dir}) ENDFOREACH(dir ${SUBDIRS}) +# Header configuration +# ==================== +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${${PROJECT_NAME_UC}_VERSION} + OUTPUT_VARIABLE XVERSION) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/GUI_version.h.in) SET(output ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h) MESSAGE(STATUS "Creation of ${output}") CONFIGURE_FILE(${input} ${output} @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h DESTINATION ${SALOME_INSTALL_HEADERS}) + +# Configuration export +# (here only the level 1 prerequisites are exposed) +# ==================== +INCLUDE(CMakePackageConfigHelpers) + +# List of targets in this project we want to make visible to the rest of the world. +# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup" +SET(_${PROJECT_NAME}_exposed_targets + caf CAM CASCatch DDS Event GLViewer LightApp LogWindow ObjBrowser + OCCViewer OpenGLUtils Plot2d PyConsole PyInterp QDS qtx QxScene SalomeApp + SalomeIDLGUI SalomeObject SalomePrs SalomePyQtGUILight SalomePyQtGUI + SalomePyQt SalomePy SalomeSession SalomeStyle SOCC SPlot2d std SUITApp suit + SUPERVGraph SVTK ToolsGUI ViewerTools VTKViewer vtkTools SalomeGuiHelpers + SalomeTreeData +) + +IF(SALOME_BUILD_TESTS) + LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeAppTest) +ENDIF() + +# Add all targets to the build-tree export set +EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets} + FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake) + +# Create the configuration files: +# - in the build tree: + +# Ensure the variables are always defined for the configure: +SET(CPPUNIT_ROOT_DIR "${CPPUNIT_ROOT_DIR}") + +SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include") +CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in + ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}" + PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX + KERNEL_ROOT_DIR) + +# - in the install tree: +# Get the relative path of the include directory so +# we can register it in the generated configuration files: +SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") +CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in + ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake + INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}" + PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX + KERNEL_ROOT_DIR) + +WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake + VERSION ${${PROJECT_NAME_UC}_VERSION} + COMPATIBILITY AnyNewerVersion) + +# Install the CMake configuration files: +INSTALL(FILES + "${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake" + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" + DESTINATION "${SALOME_INSTALL_CMAKE}") + +# Install the export set for use with the install-tree +INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE}" + FILE ${PROJECT_NAME}Targets.cmake) diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index f4a2993a4..ff7aec4dc 100755 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -26,14 +26,16 @@ ADD_SUBDIRECTORY(deprecated) # These files are data, module or lib files SET(DATA FindCAS.cmake - UseQT4EXT.cmake - FindQWT.cmake + UseQt4Ext.cmake + FindQwt.cmake FindGUI.cmake + FindSIP.cmake + FindPyQt4.cmake FindSalomeCAS.cmake - FindSalomePYQT4.cmake - FindSalomeQT4.cmake - FindSalomeQWT.cmake + FindSalomePyQt4.cmake + FindSalomeQt4.cmake + FindSalomeQwt.cmake FindSalomeSIP.cmake FindSalomeVTK.cmake ) -INSTALL(FILES ${DATA} DESTINATION ${GUI_admlocalcmake}) +INSTALL(FILES ${DATA} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL}) diff --git a/adm_local/cmake_files/FindCAS.cmake b/adm_local/cmake_files/FindCAS.cmake index 0432175b7..985ef233a 100644 --- a/adm_local/cmake_files/FindCAS.cmake +++ b/adm_local/cmake_files/FindCAS.cmake @@ -17,50 +17,76 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# SET(OCC_VERSION_MAJOR 6) -# SET(OCC_VERSION_MINOR 3) -# SET(OCC_VERSION_MAINTENANCE 10) -SET(CAS_VERSION_DEVELOPMENT 0) +IF(NOT CAS_FIND_QUIETLY) + MESSAGE(STATUS "Looking for OpenCascade (CAS) ...") +ENDIF() + +SET(_CAS_VERSION_FILE_NAME Standard_Version.hxx) -FIND_FILE(ff Standard_Version.hxx) +# Include directories: +FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES inc) +FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES inc) +MARK_AS_ADVANCED(CAS_VERSION_FILE) -IF(ff) - FILE(STRINGS ${ff} CAS_VERSION_DEVELOPMENT_STR +# Is this a development version: +SET(CAS_VERSION_DEVELOPMENT 0) +IF(CAS_VERSION_FILE) + FILE(STRINGS ${CAS_VERSION_FILE} CAS_VERSION_DEVELOPMENT_STR REGEX "^ *#define OCC_VERSION_DEVELOPMENT *\"dev\".*$") IF(CAS_VERSION_DEVELOPMENT_STR) SET(CAS_VERSION_DEVELOPMENT 1) ENDIF(CAS_VERSION_DEVELOPMENT_STR) -ENDIF(ff) + + # Extract normal version: + FILE(STRINGS ${CAS_VERSION_FILE} _tmp + REGEX "^ *#define OCC_VERSION_COMPLETE *\"[^\"]*\".*$") + STRING(REGEX REPLACE ".*\"([^\"]*)\".*" "\\1" CAS_VERSION_STR "${_tmp}") + +ENDIF() + +IF(CAS_VERSION_DEVELOPMENT AND (NOT CAS_FIND_QUIETLY)) + MESSAGE(STATUS "OpenCascade: development version is being used!") +ENDIF() + +# Win specific stuff: +IF(WIN32) + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + SET(CMAKE_LIBRARY_PATH ${CAS_ROOT_DIR}/win32/libd) + ELSE() + SET(CMAKE_LIBRARY_PATH ${CAS_ROOT_DIR}/win32/lib) + ENDIF() +ENDIF() +# Definitions: SET(CAS_DEFINITIONS "-DLIN -DLINTEL -DCSFDB") SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DNo_exception") SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H") -SET(CAS_INCLUDE_DIRS ${CAS_ROOT_DIR}/inc) +# Test for 64 bit machine: IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -D_OCC64") -ENDIF(CMAKE_SIZEOF_VOID_P STREQUAL 8) +ENDIF() IF(CAS_VERSION_DEVELOPMENT STREQUAL 1) SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DCAS_VERSION_DEVELOPMENT") -ENDIF(CAS_VERSION_DEVELOPMENT STREQUAL 1) +ENDIF() -IF(NOT WINDOWS) +# Find Xmu library (X11 widgets?) +IF(NOT WIN32) FIND_LIBRARY(CAS_Xmu Xmu) IF(Xmu) SET(CAS_LDPATH ${Xmu}) - ENDIF(Xmu) -ENDIF(NOT WINDOWS) + ENDIF() +ENDIF() -FIND_LIBRARY(CAS_BinLPlugin BinLPlugin ) -FIND_LIBRARY(CAS_BinPlugin BinPlugin ) -FIND_LIBRARY(CAS_BinTObjPlugin BinTObjPlugin ) -FIND_LIBRARY(CAS_BinXCAFPlugin BinXCAFPlugin ) +#FIND_LIBRARY(CAS_BinLPlugin BinLPlugin ) +#FIND_LIBRARY(CAS_BinPlugin BinPlugin ) +#FIND_LIBRARY(CAS_BinTObjPlugin BinTObjPlugin ) +#FIND_LIBRARY(CAS_BinXCAFPlugin BinXCAFPlugin ) FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin ) -# FIND_LIBRARY(CAS_mscmd mscmd ) FIND_LIBRARY(CAS_PTKernel PTKernel ) -FIND_LIBRARY(CAS_StdLPlugin StdLPlugin ) -FIND_LIBRARY(CAS_StdPlugin StdPlugin ) +#FIND_LIBRARY(CAS_StdLPlugin StdLPlugin ) +#FIND_LIBRARY(CAS_StdPlugin StdPlugin ) FIND_LIBRARY(CAS_TKAdvTools TKAdvTools ) FIND_LIBRARY(CAS_TKBin TKBin ) FIND_LIBRARY(CAS_TKBinL TKBinL ) @@ -71,14 +97,6 @@ FIND_LIBRARY(CAS_TKBool TKBool ) FIND_LIBRARY(CAS_TKBRep TKBRep ) FIND_LIBRARY(CAS_TKCAF TKCAF ) FIND_LIBRARY(CAS_TKCDF TKCDF ) -# FIND_LIBRARY(CAS_TKCDLFront TKCDLFront ) -# FIND_LIBRARY(CAS_TKCPPClient TKCPPClient ) -# FIND_LIBRARY(CAS_TKCPPExt TKCPPExt ) -# FIND_LIBRARY(CAS_TKCPPIntExt TKCPPIntExt ) -# FIND_LIBRARY(CAS_TKCPPJini TKCPPJini ) -# FIND_LIBRARY(CAS_TKCSFDBSchema TKCSFDBSchema ) -# FIND_LIBRARY(CAS_TKDCAF TKDCAF ) -# FIND_LIBRARY(CAS_TKDraw TKDraw ) FIND_LIBRARY(CAS_TKernel TKernel ) FIND_LIBRARY(CAS_TKFeat TKFeat ) FIND_LIBRARY(CAS_TKFillet TKFillet ) @@ -87,7 +105,6 @@ FIND_LIBRARY(CAS_TKG3d TKG3d ) FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo ) FIND_LIBRARY(CAS_TKGeomBase TKGeomBase ) FIND_LIBRARY(CAS_TKHLR TKHLR ) -# FIND_LIBRARY(CAS_TKIDLFront TKIDLFront ) FIND_LIBRARY(CAS_TKIGES TKIGES ) FIND_LIBRARY(CAS_TKLCAF TKLCAF ) FIND_LIBRARY(CAS_TKMath TKMath ) @@ -110,20 +127,13 @@ FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 ) FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr ) FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase ) FIND_LIBRARY(CAS_TKSTL TKSTL ) -# FIND_LIBRARY(CAS_TKTCPPExt TKTCPPExt ) FIND_LIBRARY(CAS_TKTObj TKTObj ) -# FIND_LIBRARY(CAS_TKTObjDRAW TKTObjDRAW ) FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo ) -# FIND_LIBRARY(CAS_TKTopTest TKTopTest ) -FIND_LIBRARY(CAS_TKV2d TKV2d ) +#FIND_LIBRARY(CAS_TKV2d TKV2d ) FIND_LIBRARY(CAS_TKV3d TKV3d ) -# FIND_LIBRARY(CAS_TKViewerTest TKViewerTest ) FIND_LIBRARY(CAS_TKVRML TKVRML ) -# FIND_LIBRARY(CAS_TKWOK TKWOK ) -# FIND_LIBRARY(CAS_TKWOKTcl TKWOKTcl ) FIND_LIBRARY(CAS_TKXCAF TKXCAF ) FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema ) -# FIND_LIBRARY(CAS_TKXDEDRAW TKXDEDRAW ) FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES ) FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP ) FIND_LIBRARY(CAS_TKXMesh TKXMesh ) @@ -132,20 +142,11 @@ FIND_LIBRARY(CAS_TKXmlL TKXmlL ) FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj ) FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF ) FIND_LIBRARY(CAS_TKXSBase TKXSBase ) -# FIND_LIBRARY(CAS_TKXSDRAW TKXSDRAW ) -# FIND_LIBRARY(CAS_wokcmd wokcmd ) -# FIND_LIBRARY(CAS_wokdeliverysteps wokdeliverysteps ) -# FIND_LIBRARY(CAS_wokdfltsteps wokdfltsteps ) -# FIND_LIBRARY(CAS_wokobjssteps wokobjssteps ) -# FIND_LIBRARY(CAS_wokorbixsteps wokorbixsteps ) -# FIND_LIBRARY(CAS_woksteps woksteps ) -# FIND_LIBRARY(CAS_woktoolscmd woktoolscmd ) -# FIND_LIBRARY(CAS_wokutilscmd wokutilscmd ) -FIND_LIBRARY(CAS_XCAFPlugin XCAFPlugin ) -FIND_LIBRARY(CAS_XmlLPlugin XmlLPlugin ) -FIND_LIBRARY(CAS_XmlPlugin XmlPlugin ) -FIND_LIBRARY(CAS_XmlTObjPlugin XmlTObjPlugin ) -FIND_LIBRARY(CAS_XmlXCAFPlugin XmlXCAFPlugin ) +#FIND_LIBRARY(CAS_XCAFPlugin XCAFPlugin ) +#FIND_LIBRARY(CAS_XmlLPlugin XmlLPlugin ) +#FIND_LIBRARY(CAS_XmlPlugin XmlPlugin ) +#FIND_LIBRARY(CAS_XmlTObjPlugin XmlTObjPlugin ) +#FIND_LIBRARY(CAS_XmlXCAFPlugin XmlXCAFPlugin ) SET(CAS_KERNEL ${CAS_TKernel} ${CAS_TKMath}) SET(CAS_OCAF ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKCDF} ${CAS_TKLCAF}) @@ -168,3 +169,70 @@ SET(CAS_TKIGES ${CAS_TKIGES_EA}) SET(CAS_TKSTEP ${CAS_TKSTEP_EA}) SET(CAS_TKSTL ${CAS_TKSTL_EA}) SET(CAS_TKCAF ${CAS_TKCAF_EA}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAS + REQUIRED_VARS CAS_INCLUDE_DIRS + CAS_FWOSPlugin + CAS_PTKernel + CAS_TKAdvTools + CAS_TKBin + CAS_TKBinL + CAS_TKBinTObj + CAS_TKBinXCAF + CAS_TKBO + CAS_TKBool + CAS_TKBRep + CAS_TKCAF + CAS_TKCDF + CAS_TKernel + CAS_TKFeat + CAS_TKFillet + CAS_TKG2d + CAS_TKG3d + CAS_TKGeomAlgo + CAS_TKGeomBase + CAS_TKHLR + CAS_TKIGES + CAS_TKLCAF + CAS_TKMath + CAS_TKMesh + CAS_TKMeshVS + CAS_TKNIS + CAS_TKOffset + CAS_TKOpenGl + CAS_TKPCAF + CAS_TKPLCAF + CAS_TKPrim + CAS_TKPShape + CAS_TKService + CAS_TKShapeSchema + CAS_TKShHealing + CAS_TKStdLSchema + CAS_TKStdSchema + CAS_TKSTEP + CAS_TKSTEP209 + CAS_TKSTEPAttr + CAS_TKSTEPBase + CAS_TKSTL + CAS_TKTObj + CAS_TKTopAlgo + CAS_TKV3d + CAS_TKVRML + CAS_TKXCAF + CAS_TKXCAFSchema + CAS_TKXDEIGES + CAS_TKXDESTEP + CAS_TKXMesh + CAS_TKXml + CAS_TKXmlL + CAS_TKXmlTObj + CAS_TKXmlXCAF + CAS_TKXSBase +) + +IF(CAS_FOUND AND NOT CAS_FIND_QUIETLY) + MESSAGE(STATUS "Found OpenCascade version: ${CAS_VERSION_STR}") +ENDIF() + + diff --git a/adm_local/cmake_files/FindPyQt4.cmake b/adm_local/cmake_files/FindPyQt4.cmake new file mode 100644 index 000000000..821ce3b34 --- /dev/null +++ b/adm_local/cmake_files/FindPyQt4.cmake @@ -0,0 +1,90 @@ +# - Find PyQt4 installation +# Sets the following variables: +# PYQT_PYUIC_EXECUTABLE - path to the pyuic4 executable +# PYQT_PYTHONPATH - path to the PyQt Python modules +# PYQT_SIPS_DIR - path to main include directory (which contains several sub folders) +# PYQT_INCLUDE_DIRS - list of paths to include when compiling (all rooted on PYQT_SIP_DIRS) +# PYQT_SIPFLAGS - compilation flags extracted from PyQt +# +# The executables +# pyuic4 (pyuic4.bat) +# are searched. +# The Python command +# pyqtconfig.Configuration().pyqt_sip_flags +# is called to get the compilation flags. +# Headers are located by looking for the header file +# qobject.sip + +######################################################################### +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +IF(NOT PyQt4_FIND_QUIETLY) + MESSAGE(STATUS "Looking for PyQt4 ...") +ENDIF() + +FIND_PROGRAM(PYQT_PYUIC_EXECUTABLE NAMES pyuic4 pyuic4.bat) + +# Get root dir locally, going up two levels from the exec: +GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${PYQT_PYUIC_EXECUTABLE}" PATH) +GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH) + +# Typical location of qobject.sip are: +# - /usr/share/sip/PyQt4/QtCore, for a system install +# - or /sip/QtCore, for a custom install +FIND_FILE(PYQT_SIP_MAIN_FILE qobject.sip PATH_SUFFIXES sip/QtCore share/sip/PyQt4/QtCore) + +IF(PYQT_SIP_MAIN_FILE) + GET_FILENAME_COMPONENT(PYQT_SIPS_DIR "${PYQT_SIP_MAIN_FILE}" PATH) + GET_FILENAME_COMPONENT(PYQT_SIPS_DIR "${PYQT_SIPS_DIR}" PATH) +ENDIF() +MARK_AS_ADVANCED(PYQT_SIP_MAIN_FILE) + +# Get PyQt compilation flags: +SET(PYQT_PYTHONPATH "${PYQT_PYTHONPATH}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages") +SET(PYQT_SIPFLAGS) +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.path[:0] = ['${PYQT_PYTHONPATH}']; from PyQt4 import pyqtconfig; sys.stdout.write(pyqtconfig.Configuration().pyqt_sip_flags)" + OUTPUT_VARIABLE PYQT_SIPFLAGS) +SEPARATE_ARGUMENTS(PYQT_SIPFLAGS) + +SET(PYQT_INCLUDE_DIRS + "${PYQT_SIPS_DIR}" + "${PYQT_SIPS_DIR}/QtCore" + "${PYQT_SIPS_DIR}/QtGui" + "${PYQT_SIPS_DIR}/QtXml" + "${PYQT_SIPS_DIR}/QtOpenGL" + "${PYQT_SIPS_DIR}/QtAssistant" + "${PYQT_SIPS_DIR}/QtDesigner" + "${PYQT_SIPS_DIR}/QtNetwork" + "${PYQT_SIPS_DIR}/QtSql" + "${PYQT_SIPS_DIR}/QtSvg" + "${PYQT_SIPS_DIR}/QtTest" +) + +SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} -s .cc -c .) +FOREACH(_dir ${PYQT_INCLUDE_DIRS}) + LIST(APPEND PYQT_SIPFLAGS -I ${_dir}) +ENDFOREACH() + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PyQt4 REQUIRED_VARS PYQT_PYUIC_EXECUTABLE PYQT_SIPS_DIR PYQT_SIPFLAGS) + diff --git a/adm_local/cmake_files/FindQWT.cmake b/adm_local/cmake_files/FindQWT.cmake deleted file mode 100644 index 5de30f7df..000000000 --- a/adm_local/cmake_files/FindQWT.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -SET(QWT_ROOT $ENV{QWTHOME} CACHE PATH "Path to the Qwt directory") - -FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATHS ${QWT_ROOT}/include ${QWT_ROOT}/include/qwt NO_DEFAULT_PATH) -FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATHS /usr/include/qwt-qt4) -IF(WINDOWS) - SET(QWT_DEFINITIONS "-DQWT_DLL") -ENDIF(WINDOWS) - -IF(WINDOWS) - IF(CMAKE_BUILD_TYPE STREQUAL Debug) - FIND_LIBRARY(QWT_LIBRARY qwtd5 ${QWT_ROOT}/lib) - ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) - FIND_LIBRARY(QWT_LIBRARY qwt5 ${QWT_ROOT}/lib) - ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) -ELSE(WINDOWS) - FIND_LIBRARY(QWT_LIBRARY qwt-qt4 HINTS ${QWT_ROOT} PATH_SUFFIXES lib lib64 NO_DEFAULT_PATH) - FIND_LIBRARY(QWT_LIBRARY qwt-qt4) - FIND_LIBRARY(QWT_LIBRARY qwt HINTS ${QWT_ROOT} PATH_SUFFIXES lib lib64 NO_DEFAULT_PATH) - FIND_LIBRARY(QWT_LIBRARY qwt) -ENDIF(WINDOWS) - -SET(QWT_FOUND "FALSE") -IF(QWT_INCLUDE_DIR AND QWT_LIBRARY) - SET(QWT_FOUND "TRUE") - MARK_AS_ADVANCED(QWT_ROOT) - MARK_AS_ADVANCED(QWT_INCLUDE_DIR) - MARK_AS_ADVANCED(QWT_LIBRARY) -ELSE(QWT_INCLUDE_DIR AND QWT_LIBRARY) - MESSAGE(FATAL_ERROR "Qwt is required, please define QWT_ROOT CMake variable or set QWTHOME in your environment") -ENDIF(QWT_INCLUDE_DIR AND QWT_LIBRARY) \ No newline at end of file diff --git a/adm_local/cmake_files/FindQwt.cmake b/adm_local/cmake_files/FindQwt.cmake new file mode 100644 index 000000000..a14466345 --- /dev/null +++ b/adm_local/cmake_files/FindQwt.cmake @@ -0,0 +1,60 @@ +# - Find Qwt installation +# Sets the following variables: +# QWT_LIBRARY - path to the Qwt library +# QWT_INCLUDE_DIR - path to the Qwt headers +# +# The header qwt_plot.h is looked for. +# The libraries +# qwt-qt4, qwt +# are looked for. +# + +######################################################################### +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +IF(NOT Qwt_FIND_QUIETLY) + MESSAGE(STATUS "Looking for Qwt ...") +ENDIF() + +FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt) +FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATH_SUFFIXES qwt-qt4) + +IF(WIN32) + SET(QWT_DEFINITIONS "-DQWT_DLL") + + IF(CMAKE_BUILD_TYPE STREQUAL Debug) + FIND_LIBRARY(QWT_LIBRARY qwtd5) + ELSE() + FIND_LIBRARY(QWT_LIBRARY qwt5) + ENDIF() +ELSE(WIN32) + # Give precedence to qwt-qt4 library: + FIND_LIBRARY(QWT_LIBRARY qwt-qt4 PATH_SUFFIXES lib lib64) + FIND_LIBRARY(QWT_LIBRARY qwt-qt4) + FIND_LIBRARY(QWT_LIBRARY qwt PATH_SUFFIXES lib lib64) + FIND_LIBRARY(QWT_LIBRARY qwt) +ENDIF(WIN32) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qwt REQUIRED_VARS QWT_INCLUDE_DIR QWT_LIBRARY) + diff --git a/adm_local/cmake_files/FindSIP.cmake b/adm_local/cmake_files/FindSIP.cmake new file mode 100644 index 000000000..1a05df115 --- /dev/null +++ b/adm_local/cmake_files/FindSIP.cmake @@ -0,0 +1,43 @@ +# - Find SIP +# Sets the following variables: +# SIP_EXECUTABLE - path to the SIP executable +# SIP_INCLUDE_DIR - path to the SIP headers +# +# The header sip.h is looked for. +# The binary 'sip' is looked for. +# + +######################################################################### +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +IF(NOT SIP_FIND_QUIETLY) + MESSAGE(STATUS "Looking for SIP ...") +ENDIF() + +FIND_PROGRAM(SIP_EXECUTABLE sip) +FIND_PATH(SIP_INCLUDE_DIR sip.h PATH_SUFFIXES python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SIP REQUIRED_VARS SIP_INCLUDE_DIR SIP_EXECUTABLE) + + diff --git a/adm_local/cmake_files/FindSalomeCAS.cmake b/adm_local/cmake_files/FindSalomeCAS.cmake index c2b4ac325..99e00f8ba 100644 --- a/adm_local/cmake_files/FindSalomeCAS.cmake +++ b/adm_local/cmake_files/FindSalomeCAS.cmake @@ -16,29 +16,32 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# Author: Adrien Bruneton +# # OpenCascade detection for Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# -set(CAS_ROOT_DIR $ENV{CAS_ROOT_DIR} CACHE PATH "Path to OpenCascade directory") -if(EXISTS ${CAS_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${CAS_ROOT_DIR}/inc) - set(CMAKE_PROGRAM_PATH ${CAS_ROOT_DIR}/bin) - if(WINDOWS) - if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(CMAKE_LIBRARY_PATH ${CAS_ROOT}/win32/libd) - else(CMAKE_BUILD_TYPE STREQUAL Debug) - set(CMAKE_LIBRARY_DIR ${CAS_ROOT}/win32/lib) - endif(CMAKE_BUILD_TYPE STREQUAL Debug) - else(WINDOWS) - set(CMAKE_LIBRARY_PATH ${CAS_ROOT_DIR}/lib) - endif(WINDOWS) -endif(EXISTS ${CAS_ROOT_DIR}) -find_package(CAS) +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(CAS CAS_INCLUDE_DIRS 1) +MARK_AS_ADVANCED(CAS_INCLUDE_DIRS + CAS_BinLPlugin CAS_BinTObjPlugin CAS_BinXCAFPlugin CAS_FWOSPlugin CAS_PTKernel + CAS_StdLPlugin CAS_StdPlugin CAS_TKAdvTools CAS_TKBin CAS_TKBinL CAS_TKBinTObj + CAS_TKBinXCAF CAS_TKBO CAS_TKBool CAS_TKBRep CAS_TKCAF CAS_TKCDF CAS_TKernel + CAS_TKFeat CAS_TKFillet CAS_TKG2d CAS_TKG3d CAS_TKGeomAlgo CAS_TKGeomBase + CAS_TKHLR CAS_TKIGES CAS_TKLCAF CAS_TKMath CAS_TKMesh CAS_TKMeshVS CAS_TKNIS + CAS_TKOffset CAS_TKOpenGl CAS_TKPCAF CAS_TKPLCAF CAS_TKPrim CAS_TKPShape CAS_TKService + CAS_TKShapeSchema CAS_TKShHealing CAS_TKStdLSchema CAS_TKStdSchema CAS_TKSTEP CAS_TKSTEP209 + CAS_TKSTEPAttr CAS_TKSTEPBase CAS_TKSTL CAS_TKTObj CAS_TKTopAlgo CAS_TKV2d CAS_TKV3d CAS_TKVRML + CAS_TKXCAF CAS_TKXCAFSchema CAS_TKXDEIGES CAS_TKXDESTEP CAS_TKXMesh CAS_TKXml CAS_TKXmlL CAS_TKXmlTObj + CAS_TKXmlXCAF CAS_TKXSBase CAS_XCAFPlugin CAS_XmlLPlugin CAS_XmlPlugin CAS_XmlTObjPlugin + CAS_XmlXCAFPlugin CAS_Xmu) IF(CAS_StdLPlugin) SET(CAS_STDPLUGIN StdPlugin) -ELSE(CAS_StdLPlugin) +ELSE() IF(CAS_TKStdSchema) SET(CAS_STDPLUGIN TKStdSchema) - ENDIF(CAS_TKStdSchema) -ENDIF(CAS_StdLPlugin) \ No newline at end of file + ENDIF() +ENDIF() diff --git a/adm_local/cmake_files/FindSalomeQWT.cmake b/adm_local/cmake_files/FindSalomeOpenGL.cmake similarity index 72% rename from adm_local/cmake_files/FindSalomeQWT.cmake rename to adm_local/cmake_files/FindSalomeOpenGL.cmake index 8711cbb54..964284eea 100644 --- a/adm_local/cmake_files/FindSalomeQWT.cmake +++ b/adm_local/cmake_files/FindSalomeOpenGL.cmake @@ -16,13 +16,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# Author: Adrien Bruneton +# -# QWT detection for salome - -set(QWT_ROOT_DIR $ENV{QWT_ROOT_DIR} CACHE PATH "Path to Qwt directory") -if(EXISTS ${QWT_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${QWT_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${QWT_ROOT_DIR}/lib) - set(CMAKE_PROGRAM_PATH ${QWT_ROOT_DIR}/bin) -endif(EXISTS ${QWT_ROOT_DIR}) -find_package(QWT) +# OpenGL detection dor Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenGL OPENGL_INCLUDE_DIR 1) +#MARK_AS_ADVANCED() diff --git a/adm_local/cmake_files/FindSalomePYQT4.cmake b/adm_local/cmake_files/FindSalomePYQT4.cmake deleted file mode 100644 index ab6d8f1e5..000000000 --- a/adm_local/cmake_files/FindSalomePYQT4.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# PyQt4 detection for Salome - -set(PYQT_ROOT_DIR $ENV{PYQT_ROOT_DIR} CACHE PATH "Path to PyQt4 directory") -if(EXISTS ${PYQT_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${PYQT_ROOT_DIR}/share/sip ${PYQT_ROOT_DIR}/sip) - set(CMAKE_PROGRAM_PATH ${PYQT_ROOT_DIR}/bin) -endif(EXISTS ${PYQT_ROOT_DIR}) -FIND_PROGRAM(PYQT_PYUIC_EXECUTABLE NAMES pyuic4 pyuic4.bat) -FIND_PATH(PYQT_SIPS_DIR NAMES QtCore QtGui QtXml QtOpenGL QtAssistant QtDesigner QtNetwork QtSql QtSvg QtTest HINTS /usr/share/sip/PyQt4) -SET(PYQT_PYTHONPATH "") -if(EXISTS ${PYQT_ROOT_DIR}) - set(PYQT_PYTHONPATH ${PYQT_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) -endif(EXISTS ${PYQT_ROOT_DIR}) -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.path[:0] = ['${PYQT_PYTHONPATH}']; from PyQt4 import pyqtconfig; sys.stdout.write(pyqtconfig.Configuration().pyqt_sip_flags)" - OUTPUT_VARIABLE PYQT_SIPFLAGS) -SEPARATE_ARGUMENTS(PYQT_SIPFLAGS) -SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} -s .cc -c . - -I ${PYQT_SIPS_DIR} - -I ${PYQT_SIPS_DIR}/QtCore -I ${PYQT_SIPS_DIR}/QtGui -I ${PYQT_SIPS_DIR}/QtXml -I ${PYQT_SIPS_DIR}/QtOpenGL - -I ${PYQT_SIPS_DIR}/QtAssistant -I ${PYQT_SIPS_DIR}/QtDesigner -I ${PYQT_SIPS_DIR}/QtNetwork -I ${PYQT_SIPS_DIR}/QtSql - -I ${PYQT_SIPS_DIR}/QtSvg -I ${PYQT_SIPS_DIR}/QtTest ) diff --git a/adm_local/cmake_files/FindSalomeQT4.cmake b/adm_local/cmake_files/FindSalomePyQt4.cmake similarity index 59% rename from adm_local/cmake_files/FindSalomeQT4.cmake rename to adm_local/cmake_files/FindSalomePyQt4.cmake index f6778287e..0903ecadc 100644 --- a/adm_local/cmake_files/FindSalomeQT4.cmake +++ b/adm_local/cmake_files/FindSalomePyQt4.cmake @@ -16,19 +16,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# Author: Adrien Bruneton +# -# Qt4 detection for Salome - -#set(QT_MIN_VERSION 4.8.0) -set(QT_ROOT_DIR $ENV{QT_ROOT_DIR} CACHE PATH "Path to Qt directory") -if(EXISTS ${QT_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${QT_ROOT_DIR}/include) - set(CMAKE_LIBRARY_PATH ${QT_ROOT_DIR}/lib) - set(CMAKE_PROGRAM_PATH ${QT_ROOT_DIR}/bin) -endif(EXISTS ${QT_ROOT_DIR}) -find_package(Qt4 REQUIRED QtCore QtGui QtXml QtWebKit QtOpenGL) -IF(NOT QT4_FOUND) - MESSAGE(FATAL_ERROR "Qt4 not found, please set QT_ROOT_DIR environment or cmake variable") -ELSE(NOT QT4_FOUND}) - INCLUDE(${QT_USE_FILE}) -ENDIF(NOT QT4_FOUND) +# PyQt4 detection dor Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PyQt4 PYQT_PYUIC_EXECUTABLE 2) +MARK_AS_ADVANCED(PYQT_PYUIC_EXECUTABLE PYQT_SIPS_DIR) diff --git a/adm_local/cmake_files/FindSalomeQt4.cmake b/adm_local/cmake_files/FindSalomeQt4.cmake new file mode 100644 index 000000000..ca13fca06 --- /dev/null +++ b/adm_local/cmake_files/FindSalomeQt4.cmake @@ -0,0 +1,27 @@ +# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# Author: Adrien Bruneton +# + +# Qt4 detection dor Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt4 QT_INCLUDES 2) +MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE) diff --git a/adm_local/cmake_files/FindSalomeQwt.cmake b/adm_local/cmake_files/FindSalomeQwt.cmake new file mode 100644 index 000000000..49fc476d0 --- /dev/null +++ b/adm_local/cmake_files/FindSalomeQwt.cmake @@ -0,0 +1,27 @@ +# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# Author: Adrien Bruneton +# + +# Qwt detection for Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qwt QWT_INCLUDE_DIR 1) +MARK_AS_ADVANCED(QWT_INCLUDE_DIR QWT_LIBRARY) diff --git a/adm_local/cmake_files/FindSalomeSIP.cmake b/adm_local/cmake_files/FindSalomeSIP.cmake index b7c9dab75..9406e45bc 100644 --- a/adm_local/cmake_files/FindSalomeSIP.cmake +++ b/adm_local/cmake_files/FindSalomeSIP.cmake @@ -16,13 +16,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# Author: Adrien Bruneton +# -# Sip detection for Salome - -set(SIP_ROOT_DIR $ENV{SIP_ROOT_DIR} CACHE PATH "Path to Sip directory") -if(EXISTS ${SIP_ROOT_DIR}) - set(CMAKE_INCLUDE_PATH ${SIP_ROOT_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} ${SIP_ROOT_DIR}/include) - set(CMAKE_PROGRAM_PATH ${SIP_ROOT_DIR}/bin) -endif(EXISTS ${SIP_ROOT_DIR}) -find_program(SIP_EXECUTABLE sip REQUIRED) -find_path(SIP_INCLUDE_DIR sip.h REQUIRED HINTS /usr/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) +# SIP detection dor Salome +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(SIP SIP_EXECUTABLE 2) +MARK_AS_ADVANCED(SIP_EXECUTABLE SIP_INCLUDE_DIR) diff --git a/adm_local/cmake_files/FindSalomeVTK.cmake b/adm_local/cmake_files/FindSalomeVTK.cmake index 3f6ec83f5..6bd756cef 100644 --- a/adm_local/cmake_files/FindSalomeVTK.cmake +++ b/adm_local/cmake_files/FindSalomeVTK.cmake @@ -16,17 +16,38 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# Author: Adrien Bruneton +# # VTK detection for Salome (see http://www.vtk.org/Wiki/VTK/Build_System_Migration) +# +# !! Please read the generic detection procedure in SalomeMacros.cmake !! +# + +# List the required components: +# Seting the following variable is equivalent to having passed the components +# when calling the FIND_PACKAGE() command. +SET(SalomeVTK_FIND_COMPONENTS + vtkRenderingFreeTypeOpenGL + vtkRenderingLOD + vtkRenderingAnnotation + vtkFiltersParallel + vtkIOExport) + +# If no VTK root dir is specified, try the ParaView root dir: +SET(PARAVIEW_ROOT_DIR "$ENV{PARAVIEW_ROOT_DIR}" CACHE PATH "Path to the ParaView installation") +IF(EXISTS "${PARAVIEW_ROOT_DIR}" AND (NOT VTK_ROOT_DIR)) + MESSAGE(STATUS "Looking for VTK in the ParaView installation (PARAVIEW_ROOT_DIR exists and VTK_ROOT_DIR is not defined) ...") + + # Extract sub-directory "paraview-x.xx": + FILE(GLOB VTK_DIR "${PARAVIEW_ROOT_DIR}/lib/cmake/paraview-*") + MESSAGE(STATUS "Setting VTK_DIR to: ${VTK_DIR}") +ENDIF() + +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(VTK VTK_INCLUDE_DIRS 2) +#MARK_AS_ADVANCED() -set(PARAVIEW_ROOT_DIR $ENV{PARAVIEW_ROOT_DIR} CACHE PATH "Path to ParaView directory") -set(PARAVIEW_VERSION $ENV{PARAVIEW_VERSION} CACHE STRING "Version of Paraview") -if(EXISTS ${PARAVIEW_ROOT_DIR}) - set(VTK_DIR ${PARAVIEW_ROOT_DIR}/lib/cmake/paraview-${PARAVIEW_VERSION} CACHE PATH "Path to directory including VTKConfig.cmake") -endif(EXISTS ${PARAVIEW_ROOT_DIR}) -set(VTK_COMPONENTS vtkRenderingFreeTypeOpenGL vtkRenderingLOD vtkRenderingAnnotation vtkFiltersParallel vtkIOExport) -find_package(VTK 6.0 REQUIRED COMPONENTS ${VTK_COMPONENTS} NO_MODULE) -if (VTK_FOUND) - message(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}") - message(STATUS "VTK libraries are: ${VTK_LIBRARIES}") -endif(VTK_FOUND) +IF(VTK_FOUND) + MESSAGE(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}") + MESSAGE(STATUS "VTK libraries are: ${VTK_LIBRARIES}") +ENDIF() diff --git a/adm_local/cmake_files/SalomeGUIConfig.cmake.in b/adm_local/cmake_files/SalomeGUIConfig.cmake.in new file mode 100644 index 000000000..3592fdbde --- /dev/null +++ b/adm_local/cmake_files/SalomeGUIConfig.cmake.in @@ -0,0 +1,119 @@ +# - Config file for the @PROJECT_NAME@ package +# It defines the following variables. +# Specific to the pacakge @PROJECT_NAME@ itself: +# @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file +# + +############################################################### +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or +# email : webmaster.salome@opencascade.com +############################################################### + +### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE: +@PACKAGE_INIT@ + +# Load the dependencies for the libraries of @PROJECT_NAME@ +# (contains definitions for IMPORTED targets). This is only +# imported if we are not built as a subproject (in this case targets are already there) +IF(NOT Event AND NOT @PROJECT_NAME@_BINARY_DIR) + INCLUDE("@PACKAGE_SALOME_INSTALL_CMAKE@/@PROJECT_NAME@Targets.cmake") +ENDIF() + +# Package root dir: +SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@") + +#### Now the specificities + +# Options exported by the package: +SET(SALOME_USE_MPI @SALOME_USE_MPI@) +SET(SALOME_BUILD_DOC @SALOME_BUILD_DOC@) +SET(SALOME_BUILD_TESTS @SALOME_BUILD_TESTS@) +SET(SALOME_LIGHT_ONLY @SALOME_LIGHT_ONLY@) + +# Prerequisites: +SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@") + +SET_AND_CHECK(SWIG_ROOT_DIR_EXP "@PACKAGE_SWIG_ROOT_DIR@") + +# Installation directories +SET_AND_CHECK(SALOME_INSTALL_BINS "@SALOME_INSTALL_BINS@") +SET_AND_CHECK(SALOME_INSTALL_LIBS "@SALOME_INSTALL_LIBS@") +SET_AND_CHECK(SALOME_INSTALL_IDLS "@SALOME_INSTALL_IDLS@") +SET_AND_CHECK(SALOME_INSTALL_HEADERS "@SALOME_INSTALL_HEADERS@") +SET_AND_CHECK(SALOME_INSTALL_SCRIPT_SCRIPTS "@SALOME_INSTALL_SCRIPT_SCRIPTS@") +SET_AND_CHECK(SALOME_INSTALL_SCRIPT_DATA "@SALOME_INSTALL_SCRIPT_DATA@") +SET_AND_CHECK(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@") +SET_AND_CHECK(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@") +SET_AND_CHECK(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") +SET_AND_CHECK(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@") +SET_AND_CHECK(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@") +SET_AND_CHECK(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@") +SET_AND_CHECK(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@") +SET_AND_CHECK(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@") + +# Include KERNEL targets: +INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake") + +# Exposed targets: +SET(GUI_caf caf) +SET(GUI_CAM CAM) +SET(GUI_CASCatch CASCatch) +SET(GUI_DDS DDS) +SET(GUI_Event Event) +SET(GUI_GLViewer GLViewer) +SET(GUI_LightApp LightApp) +SET(GUI_LogWindow LogWindow) +SET(GUI_ObjBrowser ObjBrowser) +SET(GUI_OCCViewer OCCViewer) +SET(GUI_OpenGLUtils OpenGLUtils) +SET(GUI_Plot2d Plot2d) +SET(GUI_PyConsole PyConsole) +SET(GUI_PyInterp PyInterp) +SET(GUI_QDS QDS) +SET(GUI_qtx qtx) +SET(GUI_QxScene QxScene) +SET(GUI_SalomeApp SalomeApp) +SET(GUI_SalomeAppTest SalomeAppTest) +SET(GUI_SalomeIDLGUI SalomeIDLGUI) +SET(GUI_SalomeObject SalomeObject) +SET(GUI_SalomePrs SalomePrs) +SET(GUI_SalomePyQtGUILight SalomePyQtGUILight) +SET(GUI_SalomePyQtGUI SalomePyQtGUI) +SET(GUI_SalomePyQt SalomePyQt) +SET(GUI_SalomePy SalomePy) +SET(GUI_SalomeSession SalomeSession) +SET(GUI_SalomeStyle SalomeStyle) +SET(GUI_SOCC SOCC) +SET(GUI_SPlot2d SPlot2d) +SET(GUI_std std) +SET(GUI_SUITApp SUITApp) +SET(GUI_suit suit) +SET(GUI_SUPERVGraph SUPERVGraph) +SET(GUI_SVTK SVTK) +SET(GUI_ToolsGUI ToolsGUI) +SET(GUI_ViewerTools ViewerTools) +SET(GUI_VTKViewer VTKViewer) +#SET(GUI_vtkEDFOverloads vtkEDFOverloads ${GUI_ROOT_DIR}/lib/paraview) +SET(GUI_vtkTools vtkTools) +SET(GUI_SalomeGuiHelpers SalomeGuiHelpers) +SET(GUI_SalomeTreeData SalomeTreeData) + diff --git a/adm_local/cmake_files/UseQT4EXT.cmake b/adm_local/cmake_files/UseQt4Ext.cmake similarity index 100% rename from adm_local/cmake_files/UseQT4EXT.cmake rename to adm_local/cmake_files/UseQt4Ext.cmake diff --git a/adm_local/cmake_files/deprecated/CMakeLists.txt b/adm_local/cmake_files/deprecated/CMakeLists.txt index 3dac03d38..b5b22f6f3 100644 --- a/adm_local/cmake_files/deprecated/CMakeLists.txt +++ b/adm_local/cmake_files/deprecated/CMakeLists.txt @@ -32,4 +32,4 @@ SET(DATA FindVTK.cmake UseQT4EXT.cmake ) -INSTALL(FILES ${DATA} DESTINATION ${GUI_admlocalcmake}/deprecated) \ No newline at end of file +INSTALL(FILES ${DATA} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL}/deprecated) \ No newline at end of file diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index c0cc49690..29f771fc5 100755 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -21,11 +21,11 @@ INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) CONFIGURE_FILE(VERSION.in VERSION @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${GUI_salomebin_BINS}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${SALOME_INSTALL_BINS}) # =============================================================== # Files to be installed # =============================================================== SET(SCRIPTS runLightSalome.csh runLightSalome.sh gui_setenv.py) -SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${GUI_salomescript_SCRIPTS}) +SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_SCRIPTS}) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 8f8bbfd58..7d2a1ccee 100755 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -17,11 +17,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake) +INCLUDE(UseOmniORB) # Provided by KERNEL INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ) @@ -44,4 +44,4 @@ ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) OMNIORB_ADD_MODULE(SalomeIDLGUI "${SalomeIDLGUI_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE}) TARGET_LINK_LIBRARIES(SalomeIDLGUI ${CORBA_LIBS}) -INSTALL(TARGETS SalomeIDLGUI DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomeIDLGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/CAF/CMakeLists.txt b/src/CAF/CMakeLists.txt index ab70bae5f..7e7f872a9 100755 --- a/src/CAF/CMakeLists.txt +++ b/src/CAF/CMakeLists.txt @@ -17,12 +17,12 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT @@ -56,8 +56,8 @@ ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) ADD_LIBRARY(caf ${caf_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(caf ${COMMON_LIBS}) -INSTALL(TARGETS caf DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS caf EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/CAM/CMakeLists.txt b/src/CAM/CMakeLists.txt index f327986b1..f03e66d73 100755 --- a/src/CAM/CMakeLists.txt +++ b/src/CAM/CMakeLists.txt @@ -17,11 +17,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx @@ -56,8 +56,8 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_LIBRARY(CAM ${CAM_SOURCES} ${CAM_HEADERS_MOC}) TARGET_LINK_LIBRARIES(CAM ${COMMON_LIBS}) -INSTALL(TARGETS CAM DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS CAM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${CAMTS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${CAMTS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/CASCatch/CMakeLists.txt b/src/CASCatch/CMakeLists.txt index 37aad3edb..1c6f1cf61 100755 --- a/src/CASCatch/CMakeLists.txt +++ b/src/CASCatch/CMakeLists.txt @@ -32,8 +32,8 @@ ADD_DEFINITIONS(${CAS_DEFINITIONS}) ADD_LIBRARY(CASCatch ${CASCatch_SOURCES}) TARGET_LINK_LIBRARIES(CASCatch ${CAS_KERNEL}) -INSTALL(TARGETS CASCatch DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS CASCatch EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6d2b582a7..af0221b96 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -122,7 +122,7 @@ SET(SUBDIRS_LIGHT ## # Full (CORBA) SALOME packages ## -IF(SALOME_USE_CORBA) +IF(NOT SALOME_LIGHT_ONLY) SET(SUBDIRS_CORBA TOOLSGUI Session @@ -130,7 +130,7 @@ IF(SALOME_USE_CORBA) GuiHelpers TreeData ) -ENDIF(SALOME_USE_CORBA) +ENDIF(NOT SALOME_LIGHT_ONLY) ## # Extra Python packages diff --git a/src/DDS/CMakeLists.txt b/src/DDS/CMakeLists.txt index 3e7a7b328..bbbb6b191 100755 --- a/src/DDS/CMakeLists.txt +++ b/src/DDS/CMakeLists.txt @@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ) SET(DDS_SOURCES @@ -37,8 +37,8 @@ ADD_DEFINITIONS(${CAS_DEFINITIONS}) ADD_LIBRARY(DDS ${DDS_SOURCES}) TARGET_LINK_LIBRARIES(DDS ${CAS_KERNEL} ${CAS_OCAF}) -INSTALL(TARGETS DDS DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS DDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/Event/CMakeLists.txt b/src/Event/CMakeLists.txt index 7f1b3f7af..ee1974dc3 100755 --- a/src/Event/CMakeLists.txt +++ b/src/Event/CMakeLists.txt @@ -27,7 +27,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_LIBRARY(Event ${Event_SOURCES}) TARGET_LINK_LIBRARIES(Event ${QT_LIBRARIES}) -INSTALL(TARGETS Event DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS Event EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/GLViewer/CMakeLists.txt b/src/GLViewer/CMakeLists.txt index 355aad621..0a43ad808 100755 --- a/src/GLViewer/CMakeLists.txt +++ b/src/GLViewer/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} @@ -74,11 +74,11 @@ ADD_DEFINITIONS(${CAS_DEFINITIONS}) ADD_LIBRARY(GLViewer ${GLViewer_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(GLViewer ${COMMON_LIBS}) -INSTALL(TARGETS GLViewer DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS GLViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/GUI_PY/CMakeLists.txt b/src/GUI_PY/CMakeLists.txt index f8801c427..09abae165 100755 --- a/src/GUI_PY/CMakeLists.txt +++ b/src/GUI_PY/CMakeLists.txt @@ -30,7 +30,7 @@ SET(mypkgpython_PYTHON mytestdialog.py helper.py ) -SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${GUI_salomepythondir}/salome/gui) +SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/gui) SET(PYUIC_FILES SelectVarsDialog_ui.py @@ -52,5 +52,5 @@ ENDFOREACH(output ${PYUIC_FILES}) ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES}) FOREACH(output ${PYUIC_FILES}) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION ${GUI_salomepythondir}/salome/gui) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION ${SALOME_INSTALL_PYTHON}/salome/gui) ENDFOREACH(output ${PYUIC_FILES}) diff --git a/src/GuiHelpers/CMakeLists.txt b/src/GuiHelpers/CMakeLists.txt index 7fda47fd2..914695ebc 100755 --- a/src/GuiHelpers/CMakeLists.txt +++ b/src/GuiHelpers/CMakeLists.txt @@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../SalomeApp ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT @@ -45,7 +45,7 @@ ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNI ADD_LIBRARY(SalomeGuiHelpers ${SalomeGuiHelpers_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SalomeGuiHelpers SalomeApp ${SalomeKernelHelpers} ${CORBA_LIBS}) -INSTALL(TARGETS SalomeGuiHelpers DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomeGuiHelpers EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index 5cfebdd16..a0a25ab3b 100755 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -16,7 +16,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} @@ -25,7 +25,7 @@ INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${QWT_INCLUDE_DIR} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ${CMAKE_CURRENT_SOURCE_DIR}/../STD @@ -249,11 +249,11 @@ QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) QT4_ADD_RESOURCES(RCC_SRCS ${RCCS}) ADD_LIBRARY(LightApp ${LightApp_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) TARGET_LINK_LIBRARIES(LightApp ${COMMON_LIBS}) -INSTALL(TARGETS LightApp DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS LightApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") SET(GUI_DATA ${GUIPNG_DATA} ${CMAKE_CURRENT_SOURCE_DIR}/resources/LightApp.ini ${CMAKE_CURRENT_SOURCE_DIR}/resources/LightApp.xml) -INSTALL(FILES ${GUI_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUI_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/LogWindow/CMakeLists.txt b/src/LogWindow/CMakeLists.txt index 6497de83c..06ff190a3 100755 --- a/src/LogWindow/CMakeLists.txt +++ b/src/LogWindow/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} @@ -37,8 +37,8 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_LIBRARY(LogWindow LogWindow.cxx ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(LogWindow qtx suit ${QT_LIBRARIES}) -INSTALL(TARGETS LogWindow DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS LogWindow EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/OBJECT/CMakeLists.txt b/src/OBJECT/CMakeLists.txt index d0eeb0d71..fa05b0e1c 100755 --- a/src/OBJECT/CMakeLists.txt +++ b/src/OBJECT/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ) SET(COMMON_LIBS @@ -48,7 +48,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) ADD_LIBRARY(SalomeObject ${SalomeObject_SOURCES}) TARGET_LINK_LIBRARIES(SalomeObject ${COMMON_LIBS}) -INSTALL(TARGETS SalomeObject DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomeObject EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${COMMON_HEADERS_HXX} SALOME_Selection.h DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_HXX} SALOME_Selection.h DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/OCCViewer/CMakeLists.txt b/src/OCCViewer/CMakeLists.txt index c4ea709b7..f73f51798 100755 --- a/src/OCCViewer/CMakeLists.txt +++ b/src/OCCViewer/CMakeLists.txt @@ -20,14 +20,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${OGL_INCLUDE_DIRS} ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ${CMAKE_CURRENT_SOURCE_DIR}/../ViewerTools ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx @@ -97,7 +97,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) ADD_LIBRARY(OCCViewer ${OCCViewer_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(OCCViewer ${COMMON_LIBS}) -INSTALL(TARGETS OCCViewer DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS OCCViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H OCCViewer_AISSelector.h OCCViewer_ViewManager.h @@ -118,8 +118,8 @@ SET(COMMON_HEADERS_H OCCViewer_ToolTip.h OCCViewer_ViewFrame.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/ObjBrowser/CMakeLists.txt b/src/ObjBrowser/CMakeLists.txt index 975c9b293..589254ef1 100644 --- a/src/ObjBrowser/CMakeLists.txt +++ b/src/ObjBrowser/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} @@ -39,11 +39,11 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_LIBRARY(ObjBrowser ${ObjBrowser_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(ObjBrowser qtx ${QT_LIBRARIES}) -INSTALL(TARGETS ObjBrowser DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS ObjBrowser EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H OB.h OB_Browser.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/OpenGLUtils/CMakeLists.txt b/src/OpenGLUtils/CMakeLists.txt index 44c4c8df5..9c558ac5e 100755 --- a/src/OpenGLUtils/CMakeLists.txt +++ b/src/OpenGLUtils/CMakeLists.txt @@ -19,18 +19,18 @@ INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ) SET(COMMON_LIBS ${OPENGL_LIBRARIES} ${KERNEL_SALOMELocalTrace}) ADD_LIBRARY(OpenGLUtils OpenGLUtils_FrameBuffer.cxx) TARGET_LINK_LIBRARIES(OpenGLUtils ${COMMON_LIBS}) -INSTALL(TARGETS OpenGLUtils DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS OpenGLUtils EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H OpenGLUtils.h OpenGLUtils_FrameBuffer.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/Plot2d/CMakeLists.txt b/src/Plot2d/CMakeLists.txt index 9a9a345c7..62bf7096d 100755 --- a/src/Plot2d/CMakeLists.txt +++ b/src/Plot2d/CMakeLists.txt @@ -17,14 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QWT_INCLUDE_DIR} ${QT_INCLUDES} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) @@ -117,10 +117,10 @@ QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) ADD_LIBRARY(Plot2d ${Plot2d_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(Plot2d ${COMMON_LIBS}) -INSTALL(TARGETS Plot2d DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS Plot2d EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/Prs/CMakeLists.txt b/src/Prs/CMakeLists.txt index 9cb829e6e..fca4b65bd 100755 --- a/src/Prs/CMakeLists.txt +++ b/src/Prs/CMakeLists.txt @@ -18,7 +18,7 @@ # ADD_LIBRARY(SalomePrs SALOME_Prs.cxx) -INSTALL(TARGETS SalomePrs DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomePrs EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES SALOME_Prs.h DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES SALOME_Prs.h DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/PyConsole/CMakeLists.txt b/src/PyConsole/CMakeLists.txt index 00d0f49ca..262c8c9e7 100755 --- a/src/PyConsole/CMakeLists.txt +++ b/src/PyConsole/CMakeLists.txt @@ -17,13 +17,13 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ${CMAKE_CURRENT_SOURCE_DIR}/../PyInterp @@ -58,7 +58,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) ADD_LIBRARY(PyConsole ${PyConsole_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(PyConsole ${COMMON_LIBS}) -INSTALL(TARGETS PyConsole DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS PyConsole EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H PyConsole.h @@ -70,6 +70,6 @@ SET(COMMON_HEADERS_H PyConsole_Event.h PyConsole_Request.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/PyInterp/CMakeLists.txt b/src/PyInterp/CMakeLists.txt index 3267a4d93..e94a79852 100755 --- a/src/PyInterp/CMakeLists.txt +++ b/src/PyInterp/CMakeLists.txt @@ -17,12 +17,12 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Event ) @@ -42,7 +42,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) ADD_LIBRARY(PyInterp ${PyInterp_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(PyInterp ${COMMON_LIBS}) -INSTALL(TARGETS PyInterp DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS PyInterp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H PyInterp.h @@ -51,4 +51,4 @@ SET(COMMON_HEADERS_H PyInterp_Event.h PyInterp_Request.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/QDS/CMakeLists.txt b/src/QDS/CMakeLists.txt index 0b319fda4..03c249cf0 100755 --- a/src/QDS/CMakeLists.txt +++ b/src/QDS/CMakeLists.txt @@ -17,13 +17,13 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} ${QT_INCLUDES} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../DDS ) @@ -64,7 +64,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) ADD_LIBRARY(QDS ${QDS_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(QDS ${COMMON_LIBS}) -INSTALL(TARGETS QDS DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS QDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H QDS.h @@ -79,6 +79,6 @@ SET(COMMON_HEADERS_H QDS_RadioBox.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/Qtx/CMakeLists.txt b/src/Qtx/CMakeLists.txt index ba5b93c96..070d8c9d5 100755 --- a/src/Qtx/CMakeLists.txt +++ b/src/Qtx/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} @@ -129,7 +129,7 @@ SET(GUITS_SOURCES ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_LIBRARY(qtx ${qtx_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(qtx ${QT_LIBRARIES} ${OPENGL_LIBRARIES}) -INSTALL(TARGETS qtx DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS qtx EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H Qtx.h @@ -182,5 +182,5 @@ SET(COMMON_HEADERS_H QtxWorkstackAction.h QtxWebBrowser.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/QxGraph/CMakeLists.txt b/src/QxGraph/CMakeLists.txt index 8ae5b0a0e..04d8fae41 100755 --- a/src/QxGraph/CMakeLists.txt +++ b/src/QxGraph/CMakeLists.txt @@ -17,14 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) @@ -59,7 +59,7 @@ ADD_DEFINITIONS("${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYT ADD_LIBRARY(QxGraph ${QxGraph_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(QxGraph ${COMMON_LIBS}) -INSTALL(TARGETS QxGraph DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS QxGraph EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H QxGraph_ActiveItem.h @@ -73,8 +73,8 @@ SET(COMMON_HEADERS_H QxGraph.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/QxScene/CMakeLists.txt b/src/QxScene/CMakeLists.txt index 01c3e1ac5..04883a86c 100755 --- a/src/QxScene/CMakeLists.txt +++ b/src/QxScene/CMakeLists.txt @@ -17,14 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) @@ -54,7 +54,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTH ADD_LIBRARY(QxScene ${QxScene_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(QxScene ${COMMON_LIBS}) -INSTALL(TARGETS QxScene DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS QxScene EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H QxScene_ViewWindow.h @@ -64,8 +64,8 @@ SET(COMMON_HEADERS_H QxScene.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/ResExporter/CMakeLists.txt b/src/ResExporter/CMakeLists.txt index 885d31cbb..b840065ae 100755 --- a/src/ResExporter/CMakeLists.txt +++ b/src/ResExporter/CMakeLists.txt @@ -31,5 +31,5 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_EXECUTABLE(ResourceExporter ResourceExporter.cxx) TARGET_LINK_LIBRARIES(ResourceExporter SUITApp ${COMMON_LIBS}) -INSTALL(TARGETS ResourceExporter DESTINATION ${GUI_salomebin_BINS}) +INSTALL(TARGETS ResourceExporter EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) diff --git a/src/SALOME_PY/CMakeLists.txt b/src/SALOME_PY/CMakeLists.txt index ccd267ece..f65a08ab3 100755 --- a/src/SALOME_PY/CMakeLists.txt +++ b/src/SALOME_PY/CMakeLists.txt @@ -25,7 +25,7 @@ INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp ${CMAKE_CURRENT_SOURCE_DIR}/../Event ${CMAKE_CURRENT_SOURCE_DIR}/../Session @@ -55,12 +55,12 @@ ADD_DEFINITIONS("-DHAVE_CONFIG_H ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DE ADD_LIBRARY(SalomePy SalomePy.cxx) TARGET_LINK_LIBRARIES(SalomePy ${COMMON_LIBS}) -INSTALL(TARGETS SalomePy DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomePy DESTINATION ${SALOME_INSTALL_LIBS}) IF(WINDOWS) IF(CMAKE_BUILD_TYPE STREQUAL Release) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS}/SalomePy.dll DESTINATION ${GUI_salomelib_LIBS} RENAME libSalomePy.pyd) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}/SalomePy.dll DESTINATION ${SALOME_INSTALL_LIBS} RENAME libSalomePy.pyd) ELSE(CMAKE_BUILD_TYPE STREQUAL Release) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS}/SalomePy.dll DESTINATION ${GUI_salomelib_LIBS} RENAME libSalomePy_d.pyd) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}/SalomePy.dll DESTINATION ${SALOME_INSTALL_LIBS} RENAME libSalomePy_d.pyd) ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ENDIF(WINDOWS) diff --git a/src/SALOME_PYQT/CMakeLists.txt b/src/SALOME_PYQT/CMakeLists.txt index 14744e92c..9bcc199c3 100755 --- a/src/SALOME_PYQT/CMakeLists.txt +++ b/src/SALOME_PYQT/CMakeLists.txt @@ -20,6 +20,6 @@ ADD_SUBDIRECTORY(SALOME_PYQT_GUILight) ADD_SUBDIRECTORY(SalomePyQt) -IF(SALOME_USE_CORBA) +IF(NOT SALOME_LIGHT_ONLY) ADD_SUBDIRECTORY(SALOME_PYQT_GUI) -ENDIF(SALOME_USE_CORBA) +ENDIF(NOT SALOME_LIGHT_ONLY) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt index df2eab738..4d31e318a 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt @@ -28,7 +28,7 @@ INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../PyInterp ${CMAKE_CURRENT_SOURCE_DIR}/../../SalomeApp @@ -63,11 +63,11 @@ ADD_DEFINITIONS("-DCALL_OLD_METHODS -DHAVE_CONFIG_H ${QT_DEFINITIONS} ${PYTHON_D ADD_LIBRARY(SalomePyQtGUI SALOME_PYQT_Module.cxx ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SalomePyQtGUI ${COMMON_LIBS}) -INSTALL(TARGETS SalomePyQtGUI DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomePyQtGUI DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H SALOME_PYQT_GUI.h SALOME_PYQT_Module.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt index b8765efa2..3b3b68ca3 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt @@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../PyInterp ${CMAKE_CURRENT_SOURCE_DIR}/../../PyConsole @@ -45,15 +45,15 @@ INCLUDE_DIRECTORIES( SET(COMMON_LIBS ${PYTHON_LIBRARIES} ${PYQT_LIBRARIES} ${VTK_LIBRARIES} ${OPENGL_LIBRARIES} PyInterp LightApp) -IF(SALOME_USE_CORBA) +IF(NOT SALOME_LIGHT_ONLY) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../../SalomeApp ${OMNIORB_INCLUDE_DIR} ) SET(COMMON_LIBS ${COMMON_LIBS} SalomeApp ${SalomeContainer}) -ELSE(SALOME_USE_CORBA) +ELSE(NOT SALOME_LIGHT_ONLY) SET(COMMON_FLAGS "${COMMON_FLAGS} -DGUI_DISABLE_CORBA") -ENDIF(SALOME_USE_CORBA) +ENDIF(NOT SALOME_LIGHT_ONLY) SET(GUI_HEADERS SALOME_PYQT_PyModule.h SALOME_PYQT_ModuleLight.h SALOME_PYQT_DataModelLight.h) QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) @@ -93,7 +93,7 @@ ADD_DEFINITIONS( "-DHAVE_CONFIG_H -DCALL_OLD_METHODS ${QT_DEFINITIONS} ${CAS_DEF ADD_LIBRARY(SalomePyQtGUILight ${SalomePyQtGUI_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) TARGET_LINK_LIBRARIES(SalomePyQtGUILight ${COMMON_LIBS}) -INSTALL(TARGETS SalomePyQtGUILight DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomePyQtGUILight DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H SALOME_PYQT_GUILight.h @@ -102,4 +102,4 @@ SET(COMMON_HEADERS_H SALOME_PYQT_DataModelLight.h SALOME_PYQT_PyInterp.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt index ccc45b2e5..9f7d67b46 100755 --- a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt +++ b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt @@ -27,7 +27,7 @@ INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/idl @@ -102,16 +102,16 @@ ADD_DEFINITIONS("${QWT_DEFINITIONS} ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST ADD_LIBRARY(SalomePyQt ${SalomePyQt_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) TARGET_LINK_LIBRARIES(SalomePyQt ${COMMON_LIBS}) -INSTALL(TARGETS SalomePyQt DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomePyQt DESTINATION ${SALOME_INSTALL_LIBS}) IF(WINDOWS) IF(CMAKE_BUILD_TYPE STREQUAL Release) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS}/SalomePyQt.dll DESTINATION ${GUI_salomelib_LIBS} RENAME SalomePyQt.pyd) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}/SalomePyQt.dll DESTINATION ${SALOME_INSTALL_LIBS} RENAME SalomePyQt.pyd) ELSE(CMAKE_BUILD_TYPE STREQUAL Release) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS}/SalomePyQt.dll DESTINATION ${GUI_salomelib_LIBS} RENAME SalomePyQt_d.pyd) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}/SalomePyQt.dll DESTINATION ${SALOME_INSTALL_LIBS} RENAME SalomePyQt_d.pyd) ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) ELSE(WINDOWS) INSTALL(CODE "EXECUTE_PROCESS(COMMAND ln -sf libSalomePyQt.so SalomePyQt.so - WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS} + WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS} OUTPUT_VARIABLE ln_res)" ) ENDIF(WINDOWS) diff --git a/src/SALOME_SWIG/CMakeLists.txt b/src/SALOME_SWIG/CMakeLists.txt index ef8848745..8c37162fe 100755 --- a/src/SALOME_SWIG/CMakeLists.txt +++ b/src/SALOME_SWIG/CMakeLists.txt @@ -64,15 +64,15 @@ IF(WINDOWS) SET_TARGET_PROPERTIES(_libSALOME_Swig PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Swig_d) ENDIF(WINDOWS) -INSTALL(TARGETS _libSALOME_Swig DESTINATION ${GUI_salomepythondir}) +INSTALL(TARGETS _libSALOME_Swig DESTINATION ${SALOME_INSTALL_PYTHON}) SET(COMMON_HEADERS libSALOME_Swig.i SALOMEGUI_Swig.hxx SALOMEGUI_Swig.i ) -INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${GUI_salomeinclude_HEADERS}) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Swig.py DESTINATION ${GUI_salomepythondir}) +INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Swig.py DESTINATION ${SALOME_INSTALL_PYTHON}) # # =============================================================== @@ -86,8 +86,8 @@ SET(PYTHON_FILES test_many_objects.py test_remove_ref.py ) -SALOME_INSTALL_SCRIPTS("${PYTHON_FILES}" ${GUI_salomescript_DATA}) -SALOME_INSTALL_SCRIPTS("SALOMEGUI_shared_modules.py" ${GUI_sharedpkgpython_PYTHON}) +SALOME_INSTALL_SCRIPTS("${PYTHON_FILES}" ${SALOME_INSTALL_SCRIPT_DATA}) +SALOME_INSTALL_SCRIPTS("SALOMEGUI_shared_modules.py" ${SALOME_INSTALL_PYTHON_SHARED}) CONFIGURE_FILE(supervisionexample.py.in supervisionexample.py @ONLY) CONFIGURE_FILE(supervisiongeomexample.py.in supervisiongeomexample.py @ONLY) @@ -96,5 +96,5 @@ SET(script_DATA ${CMAKE_CURRENT_BINARY_DIR}/supervisionexample.py ${CMAKE_CURRENT_BINARY_DIR}/supervisiongeomexample.py ) -INSTALL(FILES ${script_DATA} DESTINATION ${GUI_salomescript_DATA} +INSTALL(FILES ${script_DATA} DESTINATION ${SALOME_INSTALL_SCRIPT_DATA} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/src/SOCC/CMakeLists.txt b/src/SOCC/CMakeLists.txt index 8f1c8b72c..7e89f1a75 100755 --- a/src/SOCC/CMakeLists.txt +++ b/src/SOCC/CMakeLists.txt @@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT ${CMAKE_CURRENT_SOURCE_DIR}/../Prs @@ -48,7 +48,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS}) ADD_LIBRARY(SOCC ${SOCC_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SOCC ${COMMON_LIBS}) -INSTALL(TARGETS SOCC DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SOCC EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H SOCC.h @@ -57,4 +57,4 @@ SET(COMMON_HEADERS_H SOCC_ViewWindow.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/SPlot2d/CMakeLists.txt b/src/SPlot2d/CMakeLists.txt index 080dc3f2f..a4335db8a 100755 --- a/src/SPlot2d/CMakeLists.txt +++ b/src/SPlot2d/CMakeLists.txt @@ -23,7 +23,7 @@ INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ${QWT_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d @@ -50,7 +50,7 @@ SET(SPlot2d_SOURCES ADD_LIBRARY(SPlot2d ${SPlot2d_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SPlot2d ${COMMON_LIBS}) -INSTALL(TARGETS SPlot2d DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SPlot2d EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H SPlot2d.h @@ -61,4 +61,4 @@ SET(COMMON_HEADERS_H SPlot2d_ViewWindow.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/STD/CMakeLists.txt b/src/STD/CMakeLists.txt index f79d815e5..b39fd0b9d 100755 --- a/src/STD/CMakeLists.txt +++ b/src/STD/CMakeLists.txt @@ -17,11 +17,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) @@ -53,7 +53,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_LIBRARY(std ${std_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(std ${COMMON_LIBS}) -INSTALL(TARGETS std DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS std EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H STD.h @@ -63,9 +63,9 @@ SET(COMMON_HEADERS_H STD_TabDesktop.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") SET(GUIPNG_DATA ${GUIPNG_DATA} ${CMAKE_CURRENT_SOURCE_DIR}/resources/std.ini) -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/SUIT/CMakeLists.txt b/src/SUIT/CMakeLists.txt index d4f0afe88..da0dd0a9b 100644 --- a/src/SUIT/CMakeLists.txt +++ b/src/SUIT/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} @@ -103,12 +103,12 @@ SET(GUITS_SOURCES ADD_LIBRARY(suit ${suit_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(suit ${COMMON_LIBS}) -INSTALL(TARGETS suit DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS suit EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/SUITApp/CMakeLists.txt b/src/SUITApp/CMakeLists.txt index a21a18b39..495522ebe 100755 --- a/src/SUITApp/CMakeLists.txt +++ b/src/SUITApp/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} @@ -79,14 +79,14 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) ADD_LIBRARY(SUITApp ${SUITApp_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SUITApp ${COMMON_LIBS}) -INSTALL(TARGETS SUITApp DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SUITApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) ADD_EXECUTABLE(TestSUITApp SUITApp.cxx) SET_TARGET_PROPERTIES(TestSUITApp PROPERTIES OUTPUT_NAME "SUITApp") TARGET_LINK_LIBRARIES(TestSUITApp SUITApp ${COMMON_LIBS}) -INSTALL(TARGETS TestSUITApp DESTINATION ${GUI_salomebin_BINS}) +INSTALL(TARGETS TestSUITApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") SET(COMMON_HEADERS ${COMMON_HEADERS_H} ${COMMON_HEADERS_HXX}) -INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/SUPERVGraph/CMakeLists.txt b/src/SUPERVGraph/CMakeLists.txt index c1b027bd3..5ff92509a 100755 --- a/src/SUPERVGraph/CMakeLists.txt +++ b/src/SUPERVGraph/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} @@ -60,13 +60,13 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS} ${BOO ADD_LIBRARY(SUPERVGraph ${SUPERVGraph_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SUPERVGraph ${QT_LIBRARIES} suit SalomeObject) -INSTALL(TARGETS SUPERVGraph DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SUPERVGraph EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/SVTK/CMakeLists.txt b/src/SVTK/CMakeLists.txt index 6b8b7d45e..70d90ae75 100755 --- a/src/SVTK/CMakeLists.txt +++ b/src/SVTK/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE(${VTK_USE_FILE}) INCLUDE_DIRECTORIES( @@ -25,7 +25,7 @@ INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT @@ -106,12 +106,12 @@ SET(GUITS_SOURCES ADD_LIBRARY(SVTK ${SVTK_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(SVTK ${COMMON_LIBS}) -INSTALL(TARGETS SVTK DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SVTK EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) #ADD_EXECUTABLE(TestSVTK SVTK.cxx) #SET_TARGET_PROPERTIES(TestSVTK PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}" OUTPUT_NAME "SVTK") #TARGET_LINK_LIBRARIES(TestSVTK SVTK ${COMMON_LIBS}) -#INSTALL(TARGETS TestSVTK DESTINATION ${GUI_salomebin_BINS}) +#INSTALL(TARGETS TestSVTK DESTINATION ${SALOME_INSTALL_BINS}) SET(COMMON_HEADERS_H SVTK.h @@ -147,9 +147,9 @@ SET(COMMON_HEADERS_H SVTK_ImageWriterMgr.h SVTK_Utils.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/SalomeApp/CMakeLists.txt b/src/SalomeApp/CMakeLists.txt index 3f8042c08..89f240b34 100755 --- a/src/SalomeApp/CMakeLists.txt +++ b/src/SalomeApp/CMakeLists.txt @@ -19,13 +19,11 @@ ADD_SUBDIRECTORY(pluginsdemo) -IF(CPPUNIT_IS_OK) - IF(SALOME_USE_CORBA) - ADD_SUBDIRECTORY(Test) - ENDIF(SALOME_USE_CORBA) -ENDIF(CPPUNIT_IS_OK) +IF(NOT SALOME_LIGHT_ONLY AND SALOME_BUILD_TESTS) + ADD_SUBDIRECTORY(Test) +ENDIF() -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) INCLUDE(${VTK_USE_FILE}) @@ -38,7 +36,7 @@ INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp ${CMAKE_CURRENT_SOURCE_DIR}/../CAM ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx @@ -139,7 +137,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS} ADD_LIBRARY(SalomeApp ${SalomeApp_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SalomeApp ${COMMON_LIBS}) -INSTALL(TARGETS SalomeApp DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomeApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H SalomeApp.h @@ -165,13 +163,13 @@ SET(COMMON_HEADERS_H SalomeApp_Engine_i.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") SET(INST_DATA ${GUIPNG_DATA} resources/SalomeApp.ini resources/SalomeApp.xml) -INSTALL(FILES ${INST_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${INST_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) # python modules -SALOME_INSTALL_SCRIPTS("salome_pluginsmanager.py" ${GUI_salomepythondir}) -SALOME_INSTALL_SCRIPTS("addvars2notebook.py" ${GUI_salomescript_PYTHON}) +SALOME_INSTALL_SCRIPTS("salome_pluginsmanager.py" ${SALOME_INSTALL_PYTHON}) +SALOME_INSTALL_SCRIPTS("addvars2notebook.py" ${SALOME_INSTALL_SCRIPT_PYTHON}) diff --git a/src/SalomeApp/Test/CMakeLists.txt b/src/SalomeApp/Test/CMakeLists.txt index 1ece5a30f..284e8b7d1 100755 --- a/src/SalomeApp/Test/CMakeLists.txt +++ b/src/SalomeApp/Test/CMakeLists.txt @@ -19,20 +19,20 @@ INCLUDE_DIRECTORIES( ${CPPUNIT_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ) -SET(COMMON_LIBS ${CPPUNIT_LIBS} ${PLATFORM_LIBS}) +SET(COMMON_LIBS ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS}) ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS}) ADD_LIBRARY(SalomeAppTest SalomeAppTest.cxx) TARGET_LINK_LIBRARIES(SalomeAppTest ${COMMON_LIBS}) -INSTALL(TARGETS SalomeAppTest DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomeAppTest EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) ADD_EXECUTABLE(TestSalomeApp TestSalomeApp.cxx) TARGET_LINK_LIBRARIES(TestSalomeApp SalomeAppTest ${COMMON_LIBS}) -INSTALL(TARGETS TestSalomeApp DESTINATION ${GUI_salomebin_BINS}) +INSTALL(TARGETS TestSalomeApp DESTINATION ${SALOME_INSTALL_BINS}) # TODO: should it be exported? -INSTALL(FILES SalomeAppTest.hxx DESTINATION ${GUI_salomeinclude_HEADERS}) -SALOME_INSTALL_SCRIPTS("TestSalomeApp.py" ${GUI_salomescript_PYTHON}) +INSTALL(FILES SalomeAppTest.hxx DESTINATION ${SALOME_INSTALL_HEADERS}) +SALOME_INSTALL_SCRIPTS("TestSalomeApp.py" ${SALOME_INSTALL_SCRIPT_PYTHON}) diff --git a/src/SalomeApp/pluginsdemo/CMakeLists.txt b/src/SalomeApp/pluginsdemo/CMakeLists.txt index 786afffd5..2abfb591e 100755 --- a/src/SalomeApp/pluginsdemo/CMakeLists.txt +++ b/src/SalomeApp/pluginsdemo/CMakeLists.txt @@ -39,4 +39,4 @@ SET(plugins_PYTHON minmax_plugin.py ) -SALOME_INSTALL_SCRIPTS("${plugins_PYTHON}" ${GUI_salomepluginsdir}/demo DEF_PERMS) +SALOME_INSTALL_SCRIPTS("${plugins_PYTHON}" ${SALOME_GUI_INSTALL_PLUGINS}/demo DEF_PERMS) diff --git a/src/Session/CMakeLists.txt b/src/Session/CMakeLists.txt index 77dda275e..6f8b275a3 100755 --- a/src/Session/CMakeLists.txt +++ b/src/Session/CMakeLists.txt @@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/idl ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx @@ -73,7 +73,7 @@ SET(SalomeSession_SOURCES ) ADD_LIBRARY(SalomeSession ${SalomeSession_SOURCES}) TARGET_LINK_LIBRARIES(SalomeSession ${COMMON_LIBS}) -INSTALL(TARGETS SalomeSession DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomeSession EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(SALOME_Session_Server_LIBS ${COMMON_LIBS} @@ -96,7 +96,7 @@ SET(SALOME_Session_Server_LIBS ) ADD_EXECUTABLE(SALOME_Session_Server SALOME_Session_Server.cxx) TARGET_LINK_LIBRARIES(SALOME_Session_Server ${SALOME_Session_Server_LIBS}) -INSTALL(TARGETS SALOME_Session_Server DESTINATION ${GUI_salomebin_BINS}) +INSTALL(TARGETS SALOME_Session_Server EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) SET(COMMON_HEADERS_H Session_Session_i.hxx @@ -105,4 +105,4 @@ SET(COMMON_HEADERS_H Session_ServerThread.hxx Session_ServerCheck.hxx ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/Style/CMakeLists.txt b/src/Style/CMakeLists.txt index 141a68daf..0a4a6cf04 100755 --- a/src/Style/CMakeLists.txt +++ b/src/Style/CMakeLists.txt @@ -16,11 +16,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ) @@ -58,7 +58,7 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_LIBRARY(SalomeStyle ${SalomeStyle_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) TARGET_LINK_LIBRARIES(SalomeStyle ${COMMON_LIBS}) -INSTALL(TARGETS SalomeStyle DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomeStyle EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) SET(COMMON_HEADERS_H Style.h @@ -66,7 +66,7 @@ SET(COMMON_HEADERS_H Style_Salome.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -INSTALL(FILES resources/SalomeStyle.xml DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES resources/SalomeStyle.xml DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/TOOLSGUI/CMakeLists.txt b/src/TOOLSGUI/CMakeLists.txt index 46cc1eff5..8417f66f2 100755 --- a/src/TOOLSGUI/CMakeLists.txt +++ b/src/TOOLSGUI/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} @@ -25,7 +25,7 @@ INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/idl ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT) @@ -59,9 +59,9 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMN ADD_LIBRARY(ToolsGUI ${ToolsGUI_SOURCES} ${GUI_HEADERS}) TARGET_LINK_LIBRARIES(ToolsGUI ${COMMON_LIBS}) -INSTALL(TARGETS ToolsGUI DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS ToolsGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/TreeData/CMakeLists.txt b/src/TreeData/CMakeLists.txt index 1e3ec8d1e..d01cde94a 100755 --- a/src/TreeData/CMakeLists.txt +++ b/src/TreeData/CMakeLists.txt @@ -16,7 +16,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) ADD_SUBDIRECTORY(Test) @@ -26,7 +26,7 @@ INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../SalomeApp ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp ${CMAKE_CURRENT_SOURCE_DIR}/../CAM @@ -71,7 +71,7 @@ ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNI ADD_LIBRARY(SalomeTreeData ${SalomeTreeData_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(SalomeTreeData ${COMMON_LIBS}) -INSTALL(TARGETS SalomeTreeData DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS SalomeTreeData EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/TreeData/Test/CMakeLists.txt b/src/TreeData/Test/CMakeLists.txt index 75ad0e8d9..e9f92d433 100755 --- a/src/TreeData/Test/CMakeLists.txt +++ b/src/TreeData/Test/CMakeLists.txt @@ -16,13 +16,13 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src/GuiHelpers ${CMAKE_SOURCE_DIR}/src/TreeData ) @@ -61,4 +61,4 @@ SET(TreeData_tester_SOURCES ADD_EXECUTABLE(TreeData_tester ${TreeData_tester_SOURCES}) TARGET_LINK_LIBRARIES(TreeData_tester ${COMMON_LIBS}) -INSTALL(TARGETS TreeData_guitester TreeData_tester DESTINATION ${GUI_salomebin_BINS}) +INSTALL(TARGETS TreeData_guitester TreeData_tester DESTINATION ${SALOME_INSTALL_BINS}) diff --git a/src/VTKViewer/CMakeLists.txt b/src/VTKViewer/CMakeLists.txt index 7ae0a27ba..7e5ecf102 100755 --- a/src/VTKViewer/CMakeLists.txt +++ b/src/VTKViewer/CMakeLists.txt @@ -16,14 +16,14 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE(${VTK_USE_FILE}) INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_ROOT_DIR}/include/salome + ${KERNEL_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT ) @@ -86,12 +86,12 @@ SET(GUITS_SOURCES ADD_LIBRARY(VTKViewer ${VTKViewer_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) TARGET_LINK_LIBRARIES(VTKViewer ${COMMON_LIBS}) -INSTALL(TARGETS VTKViewer DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS VTKViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) #ADD_EXECUTABLE(TestVTKViewer VTKViewer.cxx) #SET_TARGET_PROPERTIES(TestVTKViewer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}" OUTPUT_NAME "VTKViewer") #TARGET_LINK_LIBRARIES(TestVTKViewer VTKViewer ${COMMON_LIBS}) -#INSTALL(TARGETS TestVTKViewer DESTINATION ${GUI_salomebin_BINS}) +#INSTALL(TARGETS TestVTKViewer DESTINATION ${SALOME_INSTALL_BINS}) SET(COMMON_HEADERS_H VTKViewer.h @@ -128,8 +128,8 @@ SET(COMMON_HEADERS_H VTKViewer_CellCenters.h ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/ViewerTools/CMakeLists.txt b/src/ViewerTools/CMakeLists.txt index 4489c9420..588422478 100755 --- a/src/ViewerTools/CMakeLists.txt +++ b/src/ViewerTools/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(UseQt4Ext) INCLUDE_DIRECTORIES( ${QT_INCLUDES} @@ -40,8 +40,8 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_LIBRARY(ViewerTools ${ViewerTools_SOURCES} ${GUI_HEADERS_MOC}) TARGET_LINK_LIBRARIES(ViewerTools qtx ${QT_LIBRARIES}) -INSTALL(TARGETS ViewerTools DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS ViewerTools EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/tools/dlgfactory/CMakeLists.txt b/tools/dlgfactory/CMakeLists.txt index 8510d1f92..665da7f8f 100755 --- a/tools/dlgfactory/CMakeLists.txt +++ b/tools/dlgfactory/CMakeLists.txt @@ -92,4 +92,4 @@ ADD_EXECUTABLE(gtester ${gtester_SOURCES} ) TARGET_LINK_LIBRARIES(gtester ${QT_LIBRARIES}) -INSTALL(TARGETS qtester gtester DESTINATION ${GUI_salomebin_BINS}) +INSTALL(TARGETS qtester gtester DESTINATION ${SALOME_INSTALL_BINS}) diff --git a/tools/vtkEDFOverloads/CMakeLists.txt b/tools/vtkEDFOverloads/CMakeLists.txt index 0cce929ce..4a3144b84 100755 --- a/tools/vtkEDFOverloads/CMakeLists.txt +++ b/tools/vtkEDFOverloads/CMakeLists.txt @@ -21,11 +21,11 @@ INCLUDE(${VTK_USE_FILE}) ADD_LIBRARY(vtkTools vtkEDFCutter.cxx) TARGET_LINK_LIBRARIES(vtkTools ${VTK_LIBRARIES}) -INSTALL(TARGETS vtkTools DESTINATION ${GUI_salomelib_LIBS}) +INSTALL(TARGETS vtkTools DESTINATION ${SALOME_INSTALL_LIBS}) ADD_LIBRARY(vtkEDFOverloads vtkEDFFactory.cxx) TARGET_LINK_LIBRARIES(vtkEDFOverloads ${VTK_LIBRARIES} vtkTools) -INSTALL(TARGETS vtkEDFOverloads DESTINATION ${GUI_paraviewlib_LIBS}) +INSTALL(TARGETS vtkEDFOverloads DESTINATION ${SALOME_GUI_INSTALL_PARAVIEW_LIBS}) FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -- 2.39.2