Salome HOME
Updated copyright comment
[tools/configuration.git] / cmake / FindLibBatch.cmake
1 # - Find LibBatch installation
2 #
3 # The following variable are set:
4 #   LIBBATCH_FOUND        - TRUE if LibBatch installation has been found
5 #   LIBBATCH_INCLUDE_DIRS - LibBatch headers path
6 #   LIBBATCH_LIBRARIES    - LibBatch libraries
7 #
8 #  The CMake (or environment) variable LIBBATCH_ROOT_DIR can be set to
9 #  guide the detection and indicate a root directory to look into.
10 #
11 ############################################################################
12 # Copyright (C) 2012-2024  CEA, EDF, OPEN CASCADE
13 #
14 # This library is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU Lesser General Public
16 # License as published by the Free Software Foundation; either
17 # version 2.1 of the License, or (at your option) any later version.
18 #
19 # This library is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22 # Lesser General Public License for more details.
23 #
24 # You should have received a copy of the GNU Lesser General Public
25 # License along with this library; if not, write to the Free Software
26 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
27 #
28 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
29 #
30
31 # ------
32
33 IF(NOT LIBBATCH_FIND_QUIETLY)
34     MESSAGE(STATUS "Check for LibBatch ...")
35 ENDIF()
36
37 # ------
38
39 SET(LIBBATCH_ROOT_DIR $ENV{LIBBATCH_ROOT_DIR} CACHE PATH "Path to the LibBatch.")
40 IF(LIBBATCH_ROOT_DIR)
41   LIST(APPEND CMAKE_PREFIX_PATH "${LIBBATCH_ROOT_DIR}")
42 ENDIF()
43
44 FIND_PATH(LIBBATCH_INCLUDE_DIRS libbatch/BatchManager.hxx)
45 FIND_LIBRARY(LIBBATCH_LIBRARIES NAMES batch)
46
47 INCLUDE(FindPackageHandleStandardArgs)
48 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibBatch REQUIRED_VARS LIBBATCH_INCLUDE_DIRS LIBBATCH_LIBRARIES)
49
50 IF(LIBBATCH_FOUND)
51   IF(NOT LIBBATCH_FIND_QUIETLY)
52     MESSAGE(STATUS "LibBatch library: ${LIBBATCH_LIBRARIES}")
53   ENDIF()
54 ENDIF()