Salome HOME
c54c671e7700240f61083cf8b7bbbd1583cd2068
[tools/configuration.git] / cmake / FindPaco.cmake
1 # - Find Paco installation
2 #
3 # Variables set are:
4 #    PACO_INCLUDE_DIRS - include directories to add when compiling
5 #    PACO_LIBRARIES    - Paco libraries to link against
6 #
7 # You can set the environment or CMake variable PACO_ROOT_DIR to guide
8 # the detection mechanism. 
9 #
10 #############################################################
11 # Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
12 #
13 # This library is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU Lesser General Public
15 # License as published by the Free Software Foundation; either
16 # version 2.1 of the License, or (at your option) any later version.
17 #
18 # This library is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 # Lesser General Public License for more details.
22 #
23 # You should have received a copy of the GNU Lesser General Public
24 # License along with this library; if not, write to the Free Software
25 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
26 #
27 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
28 #
29
30 # ------
31
32 IF(NOT Paco_FIND_QUIETLY)
33   MESSAGE(STATUS "Check for Paco ...")
34 ENDIF()
35
36 # ------
37
38 SET(PACO_ROOT_DIR $ENV{PACO_ROOT_DIR} CACHE PATH "Path to Paco.")
39 IF(PACO_ROOT_DIR)
40   LIST(APPEND CMAKE_PREFIX_PATH "${PACO_ROOT_DIR}")
41 ENDIF(PACO_ROOT_DIR)
42
43 FIND_PATH(PACO_INCLUDE_DIRS PaCO++_InterfaceManager_impl.h)
44
45 FIND_LIBRARY(PACO_LIBRARY_PaCO PaCO)
46 FIND_LIBRARY(PACO_LIBRARY_GaBro GaBro)
47 FIND_LIBRARY(PACO_LIBRARY_BasicBC BasicBC)
48 FIND_LIBRARY(PACO_LIBRARY_PaCO_dummy PaCO_dummy)
49 FIND_LIBRARY(PACO_LIBRARY_PaCO_mpi PaCO_mpi)
50 FIND_LIBRARY(PACO_LIBRARY_PaCO_omnithread PaCO_omnithread)
51
52 FIND_PROGRAM(PACO_IDL PaCOIdlTool.sh)
53
54 MARK_AS_ADVANCED(PACO_INCLUDE_DIRS PACO_LIBRARY_PaCO PACO_LIBRARY_GaBro
55                  PACO_LIBRARY_BasicBC PACO_LIBRARY_PaCO_dummy
56                  PACO_LIBRARY_PaCO_mpi PACO_LIBRARY_PaCO_omnithread PACO_IDL)
57
58 SET(PACO_LIBRARIES
59     ${PACO_LIBRARY_PaCO}
60     ${PACO_LIBRARY_GaBro}
61     ${PACO_LIBRARY_BasicBC}
62     ${PACO_LIBRARY_PaCO_dummy}
63     ${PACO_LIBRARY_PaCO_mpi}
64     ${PACO_LIBRARY_PaCO_omnithread})
65
66 INCLUDE(FindPackageHandleStandardArgs)
67 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Paco
68     REQUIRED_VARS PACO_INCLUDE_DIRS PACO_LIBRARY_PaCO PACO_LIBRARY_GaBro
69                   PACO_LIBRARY_BasicBC PACO_LIBRARY_PaCO_dummy
70                   PACO_LIBRARY_PaCO_mpi PACO_LIBRARY_PaCO_omnithread PACO_IDL)