1 # Copyright (C) 2013-2021 CEA/DEN, EDF R&D, OPEN CASCADE
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 # Author: Roman NIKOLAEV
22 # OpenCascade detection for Salome
24 # !! Please read the generic detection procedure in SalomeMacros.cmake !!
27 # TODO: RNV: Check different OCCT layouts !!!
29 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCASCADE OpenCASCADE_INCLUDE_DIR 1)
31 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCASCADE OpenCASCADE_INCLUDE_DIR 2)
36 IF(NOT CAS_FIND_QUIETLY)
37 MESSAGE(STATUS "Found OpenCascade version: ${OpenCASCADE_VERSION}")
40 # OPENCASCADE definitions
41 SET(OpenCascade_DEFINITIONS ${OpenCASCADE_C_FLAGS} ${OpenCASCADE_CXX_FLAGS})
42 SET(OpenCascade_LDFLAGS ${OpenCASCADE_LINKER_FLAGS})
44 SALOME_ACCUMULATE_HEADERS(OpenCASCADE_INCLUDE_DIR)
45 SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OpenCASCADE_LIBRARY_DIR})
47 # RNV: Fix bug with OCCT CMake build procedure:
48 # In Debug ${OpenCASCADE_BINARY_DIR} and ${OpenCASCADE_LIBRARY_DIR} are stored in the
49 # config file w/o "d" suffix. To be checked with latest version of OCCT.
51 IF(${OpenCASCADE_BUILD_WITH_DEBUG})
54 SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OpenCASCADE_BINARY_DIR}${SUFF})
58 # TODO: Detect OpenCASCADE if it is distributed without CMake configuration.
59 IF(NOT CAS_FIND_QUIETLY)
60 MESSAGE(STATUS "Could not find OpenCASCADE ...")