Salome HOME
fixed a typo
[modules/shaper.git] / CMakeCommon / FindSalomeOpenCASCADE.cmake
1 # Copyright (C) 2013-2023  CEA, EDF, OPEN CASCADE
2 #
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.
7 #
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.
12 #
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
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 # Author: Roman NIKOLAEV
20 #
21
22 # OpenCascade detection for Salome
23 #
24 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
25 #
26
27 # TODO: RNV: Check different OCCT layouts !!!
28 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCASCADE OpenCASCADE_INCLUDE_DIR 2)
29
30 IF(OpenCASCADE_FOUND)
31
32   IF(NOT CAS_FIND_QUIETLY)
33       MESSAGE(STATUS "Found OpenCascade version: ${OpenCASCADE_VERSION}")
34   ENDIF()
35
36   # OPENCASCADE definitions
37   SET(OpenCascade_DEFINITIONS ${OpenCASCADE_C_FLAGS} ${OpenCASCADE_CXX_FLAGS})
38   SET(OpenCascade_LDFLAGS ${OpenCASCADE_LINKER_FLAGS})
39
40   SALOME_ACCUMULATE_HEADERS(OpenCASCADE_INCLUDE_DIR)
41   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OpenCASCADE_LIBRARY_DIR})
42
43 ELSE()
44   # TODO: Detect OpenCASCADE if it is distributed without CMake configuration.
45   IF(NOT CAS_FIND_QUIETLY)
46     MESSAGE(STATUS "Could not find OpenCASCADE ...")
47   ENDIF()
48 ENDIF()