Salome HOME
Merge from V6_main 01/04/2013
[plugins/blsurfplugin.git] / adm_local / cmake_files / FindCADSURF.cmake
1 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D
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.
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
20 SET(MESHGEMSHOME $ENV{MESHGEMSHOME})
21 FIND_PATH(CADSURF_INCLUDES_DIR meshgems/cadsurf.h ${MESHGEMSHOME}/include)
22 SET(MESHGEMS_CADSURF_INCLUDES)
23 SET(MESHGEMS_CADSURF_INCLUDES ${MESHGEMS_CADSURF_INCLUDES} -I${CADSURF_INCLUDES_DIR})
24
25 SET(CADSURF_LIBS_PATHS)
26 SET(CADSURF_LIBS_PATHS ${CADSURF_LIBS_PATHS} ${MESHGEMSHOME}/lib)
27
28 SET(suff)
29 IF(CMAKE_SIZEOF_VOID_P STREQUAL 8)
30   SET(suff "_64")
31 ENDIF()
32
33 IF(WINDOWS)
34   SET(CADSURF_LIBS_PATHS ${CADSURF_LIBS_PATHS} ${MESHGEMSHOME}/lib/WinXP${suff}_VC9)
35 ELSE(WINDOWS)
36   SET(CADSURF_LIBS_PATHS ${CADSURF_LIBS_PATHS} ${MESHGEMSHOME}/lib/Linux${suff})
37 ENDIF(WINDOWS)
38
39 FIND_LIBRARY(mg-cadsurf mg-cadsurf PATHS ${CADSURF_LIBS_PATHS})
40 FIND_LIBRARY(mg-precad mg-precad PATHS ${CADSURF_LIBS_PATHS})
41 FIND_LIBRARY(meshgems meshgems PATHS ${CADSURF_LIBS_PATHS})
42
43 SET(MESHGEMS_CADSURF_LIBS)
44 SET(MESHGEMS_CADSURF_LIBS ${MESHGEMS_CADSURF_LIBS} ${mg-cadsurf})
45 SET(MESHGEMS_CADSURF_LIBS ${MESHGEMS_CADSURF_LIBS} ${mg-precad})
46 IF(meshgems)
47   SET(MESHGEMS_CADSURF_LIBS ${MESHGEMS_CADSURF_LIBS} ${meshgems})
48 ENDIF(meshgems)