Salome HOME
Enable KERNEL compilation with PACO
[modules/kernel.git] / salome_adm / cmake_files / FindPaco.cmake
1 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, 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.
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 # ------
21
22 MESSAGE(STATUS "Check for Paco ...")
23
24 # ------
25
26 SET(PACO_ROOT_DIR $ENV{PACO_ROOT_DIR} CACHE PATH "Path to Paco.")
27 IF(PACO_ROOT_DIR)
28   LIST(APPEND CMAKE_PREFIX_PATH "${PACO_ROOT_DIR}")
29 ENDIF(PACO_ROOT_DIR)
30
31 FIND_PATH(PACO_INCLUDE_DIRS PaCO++_InterfaceManager_impl.h)
32
33 FIND_LIBRARY(PACO_LIBRARY_PaCO PaCO)
34 FIND_LIBRARY(PACO_LIBRARY_GaBro GaBro)
35 FIND_LIBRARY(PACO_LIBRARY_BasicBC BasicBC)
36 FIND_LIBRARY(PACO_LIBRARY_PaCO_dummy PaCO_dummy)
37 FIND_LIBRARY(PACO_LIBRARY_PaCO_mpi PaCO_mpi)
38 FIND_LIBRARY(PACO_LIBRARY_PaCO_omnithread PaCO_omnithread)
39
40 FIND_PROGRAM(PACO_IDL PaCOIdlTool.sh)
41
42 MARK_AS_ADVANCED(PACO_INCLUDE_DIRS PACO_LIBRARY_PaCO PACO_LIBRARY_GaBro
43                  PACO_LIBRARY_BasicBC PACO_LIBRARY_PaCO_dummy
44                  PACO_LIBRARY_PaCO_mpi PACO_LIBRARY_PaCO_omnithread PACO_IDL)
45
46 SET(PACO_LIBRARIES
47     ${PACO_LIBRARY_PaCO}
48     ${PACO_LIBRARY_GaBro}
49     ${PACO_LIBRARY_BasicBC}
50     ${PACO_LIBRARY_PaCO_dummy}
51     ${PACO_LIBRARY_PaCO_mpi}
52     ${PACO_LIBRARY_PaCO_omnithread})
53
54 INCLUDE(FindPackageHandleStandardArgs)
55 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Paco
56     REQUIRED_VARS PACO_INCLUDE_DIRS PACO_LIBRARY_PaCO PACO_LIBRARY_GaBro
57                   PACO_LIBRARY_BasicBC PACO_LIBRARY_PaCO_dummy
58                   PACO_LIBRARY_PaCO_mpi PACO_LIBRARY_PaCO_omnithread PACO_IDL)