1 # - Find LibBatch installation
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
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.
11 ############################################################################
12 # Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
28 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
33 IF(NOT LIBBATCH_FIND_QUIETLY)
34 MESSAGE(STATUS "Check for LibBatch ...")
39 SET(LIBBATCH_ROOT_DIR $ENV{LIBBATCH_ROOT_DIR} CACHE PATH "Path to the LibBatch.")
41 LIST(APPEND CMAKE_PREFIX_PATH "${LIBBATCH_ROOT_DIR}")
44 FIND_PATH(LIBBATCH_INCLUDE_DIRS libbatch/BatchManager.hxx)
45 FIND_LIBRARY(LIBBATCH_LIBRARIES NAMES batch)
47 INCLUDE(FindPackageHandleStandardArgs)
48 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibBatch REQUIRED_VARS LIBBATCH_INCLUDE_DIRS LIBBATCH_LIBRARIES)
51 IF(NOT LIBBATCH_FIND_QUIETLY)
52 MESSAGE(STATUS "LibBatch library: ${LIBBATCH_LIBRARIES}")