"Fossies" - the Fresh Open Source Software Archive

Member "cutter-1.10.3/src/cmake/FindGraphviz.cmake" (8 May 2020, 971 Bytes) of package /linux/privat/cutter-1.10.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) CMake source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "FindGraphviz.cmake": 1.10.2_vs_1.10.3.

    1 set (_module Graphviz)
    2 
    3 find_package(PkgConfig)
    4 if (PkgConfig_FOUND)
    5     if (NOT (CMAKE_VERSION VERSION_LESS "3.12.0"))
    6         pkg_check_modules(GVC IMPORTED_TARGET GLOBAL libgvc)
    7     elseif (NOT (CMAKE_VERSION VERSION_LESS "3.11.0"))
    8         pkg_check_modules(GVC IMPORTED_TARGET libgvc)
    9     else()
   10         pkg_check_modules(GVC libgvc)
   11     endif()
   12 endif()
   13 
   14 include(FindPackageHandleStandardArgs)
   15 find_package_handle_standard_args(${_module}
   16         FOUND_VAR ${_module}_FOUND
   17         REQUIRED_VARS GVC_INCLUDE_DIRS)
   18 
   19 if (${GVC_FOUND})
   20     if (CMAKE_VERSION VERSION_LESS "3.11.0")
   21         add_library(${_module}::GVC INTERFACE IMPORTED)
   22         set_target_properties(${_module}::GVC PROPERTIES
   23                 INTERFACE_INCLUDE_DIRECTORIES "${GVC_INCLUDE_DIRS}")
   24         set_target_properties(${_module}::GVC PROPERTIES
   25                 INTERFACE_LINK_LIBRARIES "${GVC_LIBRARIES}")
   26     else()
   27        add_library(${_module}::GVC ALIAS PkgConfig::GVC)
   28     endif()
   29 endif()