2 # Sets the following variables:
3 # MESHGEMS_INCLUDE_DIRS - path to the MESHGEMS include directory
4 # MESHGEMS_LIBRARIES - path to the MESHGEMS libraries to be linked against
7 #########################################################################
8 # Copyright (C) 2007-2013 CEA/DEN, EDF R&D
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public
12 # License as published by the Free Software Foundation; either
13 # version 2.1 of the License.
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Lesser General Public License for more details.
20 # You should have received a copy of the GNU Lesser General Public
21 # License along with this library; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
29 MESSAGE(STATUS "Check for MESHGEMS ...")
33 SET(MESHGEMS_ROOT_DIR $ENV{MESHGEMS_ROOT_DIR})
36 LIST(APPEND CMAKE_PREFIX_PATH "${MESHGEMS_ROOT_DIR}")
37 ENDIF(MESHGEMS_ROOT_DIR)
39 FIND_PATH(MESHGEMS_INCLUDE_DIRS meshgems/cadsurf.h PATH_SUFFIXES include)
47 SET(_plt WinXP${_suff}_VC9 WinXP${_suff}_VC10)
49 SET(_plt Linux${_suff})
52 FIND_LIBRARY(MESHGEMS_LIBRARY_mg-cadsurf NAMES mg-cadsurf PATH_SUFFIXES ${_plt})
53 FIND_LIBRARY(MESHGEMS_LIBRARY_mg-precad NAMES mg-precad PATH_SUFFIXES ${_plt})
54 FIND_LIBRARY(MESHGEMS_LIBRARY_meshgems NAMES meshgems PATH_SUFFIXES ${_plt})
56 # TODO: search all components
57 SET(MESHGEMS_LIBRARIES)
58 SET(MESHGEMS_LIBRARIES ${MESHGEMS_LIBRARIES} ${MESHGEMS_LIBRARY_mg-cadsurf})
59 SET(MESHGEMS_LIBRARIES ${MESHGEMS_LIBRARIES} ${MESHGEMS_LIBRARY_mg-precad})
60 IF(MESHGEMS_LIBRARY_meshgems)
61 SET(MESHGEMS_LIBRARIES ${MESHGEMS_LIBRARIES} ${MESHGEMS_LIBRARY_meshgems})
62 ENDIF(MESHGEMS_LIBRARY_meshgems)
64 INCLUDE(FindPackageHandleStandardArgs)
65 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MESHGEMS REQUIRED_VARS MESHGEMS_INCLUDE_DIRS MESHGEMS_LIBRARIES)