Salome HOME
6e103a76f50ebb0410c9d6a464177650145de616
[plugins/blsurfplugin.git] / adm_local / cmake_files / FindBLSURF.cmake
1 #  Copyright (C) 2007-2010  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(BLSURFHOME $ENV{BLSURFHOME})
21 FIND_PATH(BLSURF_INCLUDES_DIR distene/blsurf.h ${BLSURFHOME}/include)
22 SET(BLSURF_INCLUDES)
23 SET(BLSURF_INCLUDES ${BLSURF_INCLUDES} -I${BLSURF_INCLUDES_DIR})
24
25 SET(BLSURF_LIBS_PATHS)
26 SET(BLSURF_LIBS_PATHS ${BLSURF_LIBS_PATHS} ${BLSURFHOME}/lib)
27 IF(WINDOWS)
28   SET(BLSURF_LIBS_PATHS ${BLSURF_LIBS_PATHS} ${BLSURFHOME}/lib/WinXP_VC9)
29 ELSE(WINDOWS)
30   IF(CMAKE_SIZEOF_VOID_P STREQUAL 8)
31     SET(BLSURF_LIBS_PATHS ${BLSURF_LIBS_PATHS} ${BLSURFHOME}/lib/Linux_64)
32   ELSE()
33     SET(BLSURF_LIBS_PATHS ${BLSURF_LIBS_PATHS} ${BLSURFHOME}/lib/Linux)
34   ENDIF()
35 ENDIF(WINDOWS)
36
37 FIND_LIBRARY(BLSurf BLSurf PATHS ${BLSURF_LIBS_PATHS})
38 FIND_LIBRARY(distene distene PATHS ${BLSURF_LIBS_PATHS})
39
40 SET(BLSURF_LIBS)
41 SET(BLSURF_LIBS ${BLSURF_LIBS} ${BLSurf})
42 IF(distene)
43   SET(BLSURF_LIBS ${BLSURF_LIBS} ${distene})
44 ENDIF(distene)