From 0bb708b3e5349dcb80c88521036cedad8eb6d8cc Mon Sep 17 00:00:00 2001 From: akl Date: Mon, 14 Oct 2013 12:04:03 +0000 Subject: [PATCH] Detect include directory and libraries. --- salome_adm/cmake_files/FindGraphviz.cmake | 20 +++++++++++++------ .../cmake_files/FindSalomeGraphviz.cmake | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/salome_adm/cmake_files/FindGraphviz.cmake b/salome_adm/cmake_files/FindGraphviz.cmake index cf987bede..b62d7d815 100644 --- a/salome_adm/cmake_files/FindGraphviz.cmake +++ b/salome_adm/cmake_files/FindGraphviz.cmake @@ -1,10 +1,10 @@ # - Graphviz detection # -# Output variable: GRAPHVIZ_EXECUTABLE -# -# The executable 'dot' is looked for and returned in the above variable. +# Output variables: GRAPHVIZ_EXECUTABLE - where is executable 'dot' takes place. +# GRAPHVIZ_INCLUDE_DIRS - where to find headers. +# GRAPHVIZ_LIBRARIES - where to get libraries. +# GRAPHVIZ_FOUND - True if Graphiz was found. # - ########################################################################### # Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE # @@ -31,7 +31,15 @@ FIND_PROGRAM(GRAPHVIZ_EXECUTABLE dot) +FIND_PATH(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/graph.h) +SET(GRAPHVIZ_INCLUDE_DIR ${GRAPHVIZ_INCLUDE_DIR}/graphviz) + +FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY NAMES graph) +SET(GRAPHVIZ_LIBRARIES ${GRAPHVIZ_graph_LIBRARY}) + # Handle the standard arguments of the find_package() command: INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Graphviz REQUIRED_VARS GRAPHVIZ_EXECUTABLE) - +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Graphviz REQUIRED_VARS + GRAPHVIZ_EXECUTABLE + GRAPHVIZ_LIBRARIES + GRAPHVIZ_INCLUDE_DIR) diff --git a/salome_adm/cmake_files/FindSalomeGraphviz.cmake b/salome_adm/cmake_files/FindSalomeGraphviz.cmake index e9b02f7bb..b6ee8aeb1 100644 --- a/salome_adm/cmake_files/FindSalomeGraphviz.cmake +++ b/salome_adm/cmake_files/FindSalomeGraphviz.cmake @@ -24,5 +24,5 @@ # !! Please read the generic detection procedure in SalomeMacros.cmake !! # -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Graphviz GRAPHVIZ_EXECUTABLE 2) -MARK_AS_ADVANCED(GRAPHVIZ_EXECUTABLE) +SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Graphviz GRAPHVIZ_EXECUTABLE GRAPHVIZ_LIBRARIES GRAPHVIZ_INCLUDE_DIR 2) +MARK_AS_ADVANCED(GRAPHVIZ_EXECUTABLE GRAPHVIZ_LIBRARIES GRAPHVIZ_INCLUDE_DIR) -- 2.39.2