2021-03-23 19:44:27 +05:00
|
|
|
# Copyright (C) 2012-2021 CEA/DEN, EDF R&D, OPEN CASCADE
|
2013-10-10 18:57:42 +06:00
|
|
|
#
|
|
|
|
# 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
|
2014-02-20 18:25:37 +06:00
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
2013-10-10 18:57:42 +06:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
|
2013-10-18 19:29:00 +06:00
|
|
|
PROJECT(SalomeSMESH C CXX)
|
2013-10-10 18:57:42 +06:00
|
|
|
|
2017-12-08 19:09:48 +05:00
|
|
|
INCLUDE(CMakeDependentOption)
|
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
# Versioning
|
|
|
|
# ===========
|
|
|
|
# Project name, upper case
|
|
|
|
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
|
|
|
|
|
2018-09-11 19:47:20 +05:00
|
|
|
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9)
|
2021-04-27 18:20:32 +05:00
|
|
|
SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
|
2019-03-28 11:58:47 +05:00
|
|
|
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
|
2013-10-10 18:57:42 +06:00
|
|
|
SET(${PROJECT_NAME_UC}_VERSION
|
|
|
|
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
|
2018-12-10 19:29:37 +05:00
|
|
|
SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
|
2013-10-10 18:57:42 +06:00
|
|
|
|
2016-07-05 13:28:56 +05:00
|
|
|
# Common CMake macros
|
|
|
|
# ===================
|
|
|
|
SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
|
|
|
|
IF(EXISTS ${CONFIGURATION_ROOT_DIR})
|
|
|
|
LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
|
2020-04-20 14:37:41 +05:00
|
|
|
INCLUDE(SalomeMacros NO_POLICY_SCOPE)
|
2016-07-05 13:28:56 +05:00
|
|
|
ELSE()
|
|
|
|
MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
|
|
|
|
ENDIF()
|
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
# Find KERNEL
|
|
|
|
# ===========
|
|
|
|
SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
|
|
|
|
IF(EXISTS ${KERNEL_ROOT_DIR})
|
|
|
|
FIND_PACKAGE(SalomeKERNEL REQUIRED)
|
2018-06-19 21:58:29 +05:00
|
|
|
KERNEL_WITH_CORBA() #check whether KERNEL built with CORBA
|
2015-05-05 14:42:29 +05:00
|
|
|
ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
|
|
|
|
INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
|
2013-10-10 18:57:42 +06:00
|
|
|
ELSE(EXISTS ${KERNEL_ROOT_DIR})
|
|
|
|
MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
|
|
|
|
ENDIF(EXISTS ${KERNEL_ROOT_DIR})
|
|
|
|
|
|
|
|
# Platform setup
|
|
|
|
# ==============
|
|
|
|
INCLUDE(SalomeSetupPlatform) # From KERNEL
|
|
|
|
# Always build libraries as shared objects:
|
|
|
|
SET(BUILD_SHARED_LIBS TRUE)
|
|
|
|
|
|
|
|
# User options
|
|
|
|
# ============
|
2013-11-06 16:36:07 +06:00
|
|
|
OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
|
2013-10-22 13:35:44 +06:00
|
|
|
OPTION(SALOME_BUILD_DOC "Generate SALOME SMESH documentation" ON)
|
2021-03-22 17:02:50 +05:00
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
# Advanced options:
|
2019-10-22 19:24:35 +05:00
|
|
|
OPTION(SALOME_BUILD_GUI "Enable GUI" ON)
|
|
|
|
OPTION(SALOME_SMESH_USE_CGNS "Enable import/export to CGNS format" OFF)
|
|
|
|
OPTION(SALOME_SMESH_USE_TBB "Enable parallel computation" OFF)
|
|
|
|
OPTION(SALOME_SMESH_DYNLOAD_LOCAL "Load plug-ins' symbols locally (Linux only)" ON)
|
|
|
|
OPTION(SMESH_USE_MESHGEMS_HYPOSET "Prefer MeshGems algorithms in sets of hypotheses" OFF)
|
2017-12-08 19:09:48 +05:00
|
|
|
CMAKE_DEPENDENT_OPTION(SALOME_SMESH_BUILD_FRENCH_DOC "Generate SALOME SMESH French documentation" OFF
|
2018-05-11 11:12:53 +05:00
|
|
|
"SALOME_BUILD_DOC" OFF)
|
2017-10-12 19:02:58 +05:00
|
|
|
|
|
|
|
IF(SALOME_SMESH_DYNLOAD_LOCAL)
|
|
|
|
ADD_DEFINITIONS(-DDYNLOAD_LOCAL)
|
|
|
|
ENDIF(SALOME_SMESH_DYNLOAD_LOCAL)
|
2013-10-18 19:29:00 +06:00
|
|
|
|
2021-03-17 19:11:57 +05:00
|
|
|
IF(SALOME_USE_64BIT_IDS)
|
|
|
|
SET(SMESH_ID_TYPE "long long")
|
|
|
|
ELSE()
|
|
|
|
SET(SMESH_ID_TYPE "long")
|
|
|
|
ENDIF()
|
|
|
|
|
2019-10-22 19:24:35 +05:00
|
|
|
IF(SMESH_USE_MESHGEMS_HYPOSET)
|
|
|
|
SET(SMESH_USE_MESHGEMS_HYPOSET_VAR "true")
|
|
|
|
ELSE(SMESH_USE_MESHGEMS_HYPOSET)
|
|
|
|
SET(SMESH_USE_MESHGEMS_HYPOSET_VAR "false")
|
|
|
|
ENDIF(SMESH_USE_MESHGEMS_HYPOSET)
|
|
|
|
|
2013-10-18 19:29:00 +06:00
|
|
|
#On Linux use Fortran to compile MEFISTO2D
|
|
|
|
IF(NOT WIN32)
|
|
|
|
ENABLE_LANGUAGE(Fortran)
|
|
|
|
SET(SALOME_SMESH_ENABLE_MEFISTO ON)
|
|
|
|
ADD_DEFINITIONS(-DENABLE_MEFISTO)
|
|
|
|
ENDIF(NOT WIN32)
|
|
|
|
|
2019-10-22 19:24:35 +05:00
|
|
|
MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB SALOME_SMESH_DYNLOAD_LOCAL SMESH_USE_MESHGEMS_HYPOSET)
|
2013-10-10 18:57:42 +06:00
|
|
|
|
|
|
|
# Prerequisites
|
|
|
|
# =============
|
|
|
|
# Find "big" prerequisites first - they reference themselves many others
|
2017-10-09 17:28:05 +05:00
|
|
|
# -> this can help finding the smaller prerequisites and detect conflicts.
|
2013-10-10 18:57:42 +06:00
|
|
|
# In our case KERNEL has already loaded many prereq:
|
|
|
|
|
|
|
|
##
|
|
|
|
## From KERNEL:
|
|
|
|
##
|
|
|
|
|
|
|
|
# Various
|
|
|
|
# Python
|
2016-02-15 17:49:45 +05:00
|
|
|
FIND_PACKAGE(SalomePythonInterp REQUIRED)
|
|
|
|
FIND_PACKAGE(SalomePythonLibs REQUIRED)
|
2013-10-10 18:57:42 +06:00
|
|
|
# PThread
|
|
|
|
FIND_PACKAGE(SalomePThread REQUIRED)
|
|
|
|
# SWIG
|
|
|
|
FIND_PACKAGE(SalomeSWIG REQUIRED)
|
|
|
|
# Boost
|
|
|
|
FIND_PACKAGE(SalomeBoost REQUIRED)
|
|
|
|
# CORBA
|
|
|
|
FIND_PACKAGE(SalomeOmniORB REQUIRED)
|
|
|
|
FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
|
|
|
|
# LibXml2
|
|
|
|
FIND_PACKAGE(SalomeLibXml2 REQUIRED)
|
|
|
|
# HDF5
|
|
|
|
FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C)
|
|
|
|
|
|
|
|
# Other KERNEL optionals:
|
2013-11-06 16:36:07 +06:00
|
|
|
IF(SALOME_BUILD_TESTS)
|
|
|
|
ENABLE_TESTING()
|
|
|
|
FIND_PACKAGE(SalomeCppUnit)
|
|
|
|
SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS)
|
|
|
|
ENDIF()
|
2013-10-10 18:57:42 +06:00
|
|
|
IF(SALOME_BUILD_DOC)
|
|
|
|
FIND_PACKAGE(SalomeDoxygen)
|
|
|
|
FIND_PACKAGE(SalomeSphinx)
|
2021-02-19 11:52:32 +05:00
|
|
|
INCLUDE(UseSphinx)
|
|
|
|
SPHINX_CHECK_EXTENSIONS(sphinx_rtd_theme)
|
|
|
|
IF(SPHINX_VERSION VERSION_LESS "1.3")
|
|
|
|
SPHINX_CHECK_EXTENSIONS(sphinxcontrib.napoleon)
|
|
|
|
ENDIF()
|
2013-10-10 18:57:42 +06:00
|
|
|
SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC)
|
|
|
|
SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
# Find GUI
|
|
|
|
IF(SALOME_BUILD_GUI)
|
|
|
|
SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
|
|
|
|
IF(EXISTS ${GUI_ROOT_DIR})
|
|
|
|
FIND_PACKAGE(SalomeGUI)
|
2018-06-19 21:58:29 +05:00
|
|
|
SALOME_GUI_WITH_CORBA() #check whether GUI built with CORBA
|
2021-03-22 17:02:50 +05:00
|
|
|
SALOME_GUI_MODE(SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT
|
2015-06-11 18:21:30 +05:00
|
|
|
OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_PYCONSOLE)
|
2013-10-10 18:57:42 +06:00
|
|
|
##
|
|
|
|
## Prerequisites From GUI:
|
|
|
|
##
|
2015-11-26 19:36:23 +05:00
|
|
|
# Qt
|
2019-05-30 17:11:32 +05:00
|
|
|
FIND_PACKAGE(SalomeQt5 REQUIRED)
|
2013-10-10 18:57:42 +06:00
|
|
|
# SIP
|
2015-11-26 19:36:23 +05:00
|
|
|
FIND_PACKAGE(SalomeSIP REQUIRED) # should come after Python and before PyQt5
|
|
|
|
# PyQt
|
2019-05-30 17:11:32 +05:00
|
|
|
FIND_PACKAGE(SalomePyQt5 REQUIRED)
|
2013-10-10 18:57:42 +06:00
|
|
|
# Qwt
|
2013-10-18 19:29:00 +06:00
|
|
|
FIND_PACKAGE(SalomeQwt REQUIRED)
|
2013-10-10 18:57:42 +06:00
|
|
|
ELSE(EXISTS ${GUI_ROOT_DIR})
|
|
|
|
MESSAGE(FATAL_ERROR "GUI_ROOT_DIR is not well defined, SMESH will be built without GUI!!!")
|
|
|
|
ENDIF(EXISTS ${GUI_ROOT_DIR})
|
|
|
|
SALOME_LOG_OPTIONAL_PACKAGE(SalomeGUI SALOME_BUILD_GUI)
|
|
|
|
ENDIF(SALOME_BUILD_GUI)
|
|
|
|
|
|
|
|
# Find GEOM
|
|
|
|
# ===========
|
|
|
|
SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR} CACHE PATH "Path to the Salome GEOM")
|
|
|
|
IF(EXISTS ${GEOM_ROOT_DIR})
|
|
|
|
FIND_PACKAGE(SalomeGEOM REQUIRED)
|
2013-10-22 13:35:44 +06:00
|
|
|
ADD_DEFINITIONS(${GEOM_DEFINITIONS})
|
|
|
|
INCLUDE_DIRECTORIES(${GEOM_INCLUDE_DIRS})
|
|
|
|
IF(SALOME_BUILD_GUI)
|
|
|
|
IF(NOT SALOME_GEOM_BUILD_GUI)
|
|
|
|
MESSAGE(FATAL_ERROR "We absolutely need a Salome GEOM with GUI, please set SALOME_BUILD_GUI=ON in GEOM module")
|
|
|
|
ENDIF(NOT SALOME_GEOM_BUILD_GUI)
|
|
|
|
ENDIF(SALOME_BUILD_GUI)
|
2013-10-10 18:57:42 +06:00
|
|
|
ELSE(EXISTS ${GEOM_ROOT_DIR})
|
|
|
|
MESSAGE(FATAL_ERROR "We absolutely need a Salome GEOM, please define GEOM_ROOT_DIR")
|
|
|
|
ENDIF(EXISTS ${GEOM_ROOT_DIR})
|
|
|
|
|
2020-04-13 21:21:56 +05:00
|
|
|
# Find SHAPERSTUDY
|
|
|
|
# ================
|
|
|
|
SET(WITH_SHAPER_STUDY OFF)
|
|
|
|
SET(SHAPERSTUDY_ROOT_DIR $ENV{SHAPERSTUDY_ROOT_DIR} CACHE PATH "Path to the Salome SHAPERSTUDY")
|
|
|
|
IF(EXISTS ${SHAPERSTUDY_ROOT_DIR})
|
|
|
|
FIND_PACKAGE(SalomeSHAPERSTUDY)
|
|
|
|
IF(SalomeSHAPERSTUDY_FOUND)
|
|
|
|
SET(WITH_SHAPER_STUDY ON)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF(EXISTS ${SHAPERSTUDY_ROOT_DIR})
|
|
|
|
IF(NOT WITH_SHAPER_STUDY AND SALOME_BUILD_TESTS)
|
|
|
|
MESSAGE(WARNING "SHAPERSTUDY is not found; the corresponding tests will be omitted")
|
|
|
|
ENDIF()
|
|
|
|
|
2021-03-22 17:02:50 +05:00
|
|
|
# Find MEDCoupling
|
|
|
|
# ================
|
|
|
|
SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling tool")
|
|
|
|
IF(EXISTS ${MEDCOUPLING_ROOT_DIR})
|
|
|
|
FIND_PACKAGE(SalomeMEDCoupling REQUIRED) # will reload HDF5, MEDFile, XDR, etc ...
|
|
|
|
ELSE(EXISTS ${MEDCOUPLING_ROOT_DIR})
|
|
|
|
MESSAGE(FATAL_ERROR "We absolutely need the MEDCoupling tool, please define MEDCOUPLING_ROOT_DIR !")
|
|
|
|
ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR})
|
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
##
|
|
|
|
## SMESH specifics
|
|
|
|
##
|
|
|
|
|
|
|
|
# VTK is obligatiry for the SMESH
|
2014-10-15 16:30:12 +06:00
|
|
|
FIND_PACKAGE(SalomeVTK REQUIRED)
|
2013-10-10 18:57:42 +06:00
|
|
|
|
2021-03-22 17:02:50 +05:00
|
|
|
FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
|
2013-10-10 18:57:42 +06:00
|
|
|
|
|
|
|
IF(SALOME_SMESH_USE_CGNS)
|
|
|
|
FIND_PACKAGE(SalomeCGNS)
|
|
|
|
SALOME_LOG_OPTIONAL_PACKAGE(CGNS SALOME_SMESH_USE_CGNS)
|
2013-11-13 12:12:05 +06:00
|
|
|
ADD_DEFINITIONS(-DWITH_CGNS)
|
2013-10-10 18:57:42 +06:00
|
|
|
ENDIF(SALOME_SMESH_USE_CGNS)
|
|
|
|
|
|
|
|
IF(SALOME_SMESH_USE_TBB)
|
|
|
|
FIND_PACKAGE(SalomeTBB)
|
|
|
|
SALOME_LOG_OPTIONAL_PACKAGE(TBB SALOME_SMESH_USE_TBB)
|
2013-11-14 11:40:14 +06:00
|
|
|
ADD_DEFINITIONS(-DWITH_TBB)
|
2013-10-10 18:57:42 +06:00
|
|
|
ENDIF(SALOME_SMESH_USE_TBB)
|
|
|
|
|
|
|
|
FIND_PACKAGE(SalomeMEDFile REQUIRED)
|
|
|
|
|
2013-10-18 19:29:00 +06:00
|
|
|
#On Windows use f2c to generate C MEFISTO2D code
|
|
|
|
IF(WIN32)
|
|
|
|
SET(SALOME_SMESH_ENABLE_MEFISTO OFF)
|
|
|
|
FIND_PACKAGE(Salomef2c QUIET)
|
|
|
|
IF(${F2C_FOUND})
|
|
|
|
ADD_DEFINITIONS(-DENABLE_MEFISTO)
|
|
|
|
SET(SALOME_SMESH_ENABLE_MEFISTO ON)
|
|
|
|
MESSAGE(STATUS "Build MEFISTO2D mesher using Fortran to C generator")
|
|
|
|
ELSE(${F2C_FOUND})
|
2020-11-27 17:56:27 +05:00
|
|
|
MESSAGE(FATAL "Fortran to C generator is not found: MEFISTO2D mesher cannot be compiled! Please define F2C_ROOT_DIR !")
|
2021-03-22 17:02:50 +05:00
|
|
|
ENDIF(${F2C_FOUND})
|
2013-10-18 19:29:00 +06:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2021-03-22 17:02:50 +05:00
|
|
|
|
|
|
|
SET (SALOME_SMESH_DISABLE_MG_ADAPT OFF)
|
|
|
|
IF(WIN32)
|
|
|
|
# On Windows temporarily disable MG_ADAPT
|
|
|
|
SET (SALOME_SMESH_DISABLE_MG_ADAPT ON)
|
|
|
|
ENDIF()
|
|
|
|
IF(SALOME_SMESH_DISABLE_MG_ADAPT)
|
|
|
|
ADD_DEFINITIONS(-DDISABLE_MG_ADAPT)
|
|
|
|
ENDIF()
|
|
|
|
|
2013-10-18 19:29:00 +06:00
|
|
|
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
|
|
|
SET(MEFISTO2D_NAME "MEFISTO_2D")
|
|
|
|
ELSE(SALOME_SMESH_ENABLE_MEFISTO)
|
|
|
|
SET(MEFISTO2D_NAME "NOT_FOUND")
|
|
|
|
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
# Detection summary:
|
|
|
|
SALOME_PACKAGE_REPORT_AND_CHECK()
|
|
|
|
|
|
|
|
# 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")
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH
|
2013-10-10 18:57:42 +06:00
|
|
|
"Install path: SALOME scripts")
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH
|
2013-10-10 18:57:42 +06:00
|
|
|
"Install path: SALOME script data")
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH
|
2013-10-10 18:57:42 +06:00
|
|
|
"Install path: SALOME Python scripts")
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "${SALOME_INSTALL_APPLISKEL_SCRIPTS}" CACHE PATH
|
2013-10-10 18:57:42 +06:00
|
|
|
"Install path: SALOME application skeleton - scripts")
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_INSTALL_APPLISKEL_PYTHON "${SALOME_INSTALL_APPLISKEL_PYTHON}" CACHE PATH
|
2013-10-10 18:57:42 +06:00
|
|
|
"Install path: SALOME application skeleton - Python")
|
|
|
|
SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff")
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH
|
2013-10-10 18:57:42 +06:00
|
|
|
"Install path: SALOME Python shared modules")
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH
|
|
|
|
"Install path: local SALOME CMake files")
|
2013-10-10 18:57:42 +06:00
|
|
|
SET(SALOME_INSTALL_AMCONFIG_LOCAL "${SALOME_INSTALL_AMCONFIG_LOCAL}" CACHE PATH
|
|
|
|
"Install path: local SALOME config files (obsolete, to be removed)")
|
|
|
|
SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME resources")
|
|
|
|
SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation")
|
|
|
|
|
|
|
|
# Specific to SMESH:
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_SMESH_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/smesh" CACHE PATH
|
2013-10-10 18:57:42 +06:00
|
|
|
"Install path: SALOME SMESH specific data")
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(SALOME_SMESH_INSTALL_PLUGINS share/salome/plugins/smesh CACHE PATH
|
2013-10-10 18:57:42 +06:00
|
|
|
"Install path: SALOME SMESH plugins")
|
2021-03-22 17:02:50 +05:00
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
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_LOCAL SALOME_INSTALL_RES)
|
|
|
|
MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED)
|
|
|
|
MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC)
|
|
|
|
MARK_AS_ADVANCED(SALOME_SMESH_INSTALL_RES_DATA SALOME_SMESH_INSTALL_PLUGINS)
|
|
|
|
|
2013-10-29 14:32:59 +06:00
|
|
|
# Accumulate environment variables for SMESH module
|
2013-10-31 17:07:26 +06:00
|
|
|
SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
|
|
|
|
${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON}
|
|
|
|
${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED})
|
2021-03-22 17:02:50 +05:00
|
|
|
SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
|
2013-10-29 14:32:59 +06:00
|
|
|
|
2021-03-22 17:02:50 +05:00
|
|
|
# Sources
|
2013-10-10 18:57:42 +06:00
|
|
|
# ========
|
|
|
|
|
|
|
|
ADD_SUBDIRECTORY(idl)
|
|
|
|
ADD_SUBDIRECTORY(adm_local)
|
|
|
|
ADD_SUBDIRECTORY(resources)
|
|
|
|
ADD_SUBDIRECTORY(bin)
|
|
|
|
ADD_SUBDIRECTORY(src)
|
|
|
|
IF(SALOME_BUILD_DOC)
|
|
|
|
ADD_SUBDIRECTORY(doc)
|
|
|
|
ENDIF()
|
2020-04-13 21:21:56 +05:00
|
|
|
IF(SALOME_BUILD_TESTS)
|
|
|
|
ADD_SUBDIRECTORY(test)
|
|
|
|
ENDIF()
|
2013-10-10 18:57:42 +06:00
|
|
|
|
|
|
|
# Header configuration
|
|
|
|
# ====================
|
|
|
|
SALOME_XVERSION(${PROJECT_NAME})
|
|
|
|
SALOME_CONFIGURE_FILE(SMESH_version.h.in SMESH_version.h INSTALL ${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"
|
2021-03-22 17:02:50 +05:00
|
|
|
SET(_${PROJECT_NAME}_exposed_targets
|
2013-10-10 18:57:42 +06:00
|
|
|
SMESHControls MeshDriver MeshDriverDAT MeshDriverGMF MeshDriverMED
|
2016-04-06 19:24:26 +05:00
|
|
|
MeshDriverSTL MeshDriverUNV MEDWrapper
|
2013-10-18 19:29:00 +06:00
|
|
|
SMDS SMESHimpl SMESHEngine SMESHClient SMESHDS
|
2013-10-10 18:57:42 +06:00
|
|
|
SMESHUtils StdMeshers StdMeshersEngine MeshJobManagerEngine
|
|
|
|
SPADDERPluginTesterEngine SalomeIDLSMESH SalomeIDLSPADDER
|
|
|
|
)
|
|
|
|
|
2013-10-18 19:29:00 +06:00
|
|
|
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
|
|
|
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
2021-03-22 17:02:50 +05:00
|
|
|
MEFISTO2D)
|
2013-10-18 19:29:00 +06:00
|
|
|
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
IF(SALOME_BUILD_GUI)
|
2013-10-18 19:29:00 +06:00
|
|
|
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
2016-08-09 21:32:57 +05:00
|
|
|
SMESHObject SMESHFiltersSelection SMESH PluginUtils StdMeshersGUI
|
2013-10-10 18:57:42 +06:00
|
|
|
)
|
|
|
|
ENDIF(SALOME_BUILD_GUI)
|
|
|
|
|
|
|
|
IF(SALOME_SMESH_USE_CGNS)
|
2021-03-22 17:02:50 +05:00
|
|
|
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
2013-10-10 18:57:42 +06:00
|
|
|
MeshDriverCGNS
|
|
|
|
)
|
|
|
|
ENDIF(SALOME_SMESH_USE_CGNS)
|
|
|
|
|
|
|
|
# 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(GEOM_ROOT_DIR "${GEOM_ROOT_DIR}")
|
2021-03-29 13:55:35 +05:00
|
|
|
SET(MEDCOUPLING_ROOT_DIR "${MEDCOUPLING_ROOT_DIR}")
|
2013-10-14 15:14:04 +06:00
|
|
|
SET(MEDFILE_ROOT_DIR "${MEDFILE_ROOT_DIR}")
|
2013-10-10 18:57:42 +06:00
|
|
|
SET(CGNS_ROOT_DIR "${CGNS_ROOT_DIR}")
|
|
|
|
SET(TBB_ROOT_DIR "${TBB_ROOT_DIR}")
|
2021-03-22 17:02:50 +05:00
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
|
2013-11-05 18:49:17 +06:00
|
|
|
|
|
|
|
# Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
|
2021-03-29 13:55:35 +05:00
|
|
|
SALOME_CONFIGURE_PREPARE(MEDCoupling CGNS TBB MEDFile)
|
2013-11-05 18:49:17 +06:00
|
|
|
|
2013-10-10 18:57:42 +06:00
|
|
|
CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
|
|
|
|
${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
|
|
|
INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
|
|
|
|
PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
|
2021-03-29 13:55:35 +05:00
|
|
|
GEOM_ROOT_DIR MEDCOUPLING_ROOT_DIR MEDFILE_ROOT_DIR CGNS_ROOT_DIR TBB_ROOT_DIR)
|
2013-10-10 18:57:42 +06:00
|
|
|
|
|
|
|
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}/${PROJECT_NAME}Config.cmake"
|
|
|
|
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
|
|
|
DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}")
|
|
|
|
|
|
|
|
# Install the export set for use with the install-tree
|
2021-03-22 17:02:50 +05:00
|
|
|
INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
|
2013-10-10 18:57:42 +06:00
|
|
|
FILE ${PROJECT_NAME}Targets.cmake)
|