Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FindGraphviz: if available export version of the package from pkg-config #438

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions 3rdparty/qgv/FindGraphviz.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# Graphviz_LIBRARIES
# Graphviz_INCLUDE_DIRS
# Graphviz_DEFINITIONS
#
# If pkg-config and .pc files for graphviz are found,
# it will also define:
# Graphviz_VERSION

if(EXISTS "$ENV{Graphviz_ROOT}")
set(Graphviz_POSSIBLE_INCDIRS
Expand Down Expand Up @@ -44,8 +48,8 @@ endif()

# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if(NOT WIN32)
find_package(PkgConfig)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(Graphviz_GVC_PKG gvc QUIET)
pkg_check_modules(Graphviz_CGRAPH_PKG cgraph QUIET)
pkg_check_modules(Graphviz_CDT_PKG cdt QUIET)
Expand Down Expand Up @@ -108,6 +112,11 @@ if(WIN32)
endif()
endif()

if( (Graphviz_GVC_PKG_VERSION VERSION_EQUAL Graphviz_CGRAPH_PKG_VERSION) AND
(Graphviz_GVC_PKG_VERSION VERSION_EQUAL Graphviz_CDT_PKG_VERSION) )
set(Graphviz_VERSION ${Graphviz_GVC_PKG_VERSION})
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Graphviz
FOUND_VAR Graphviz_FOUND
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased Patch]

## [0.16.0] - 2023-11-27

### Changed

* Update CMakeRC to latest version as of November 2023 (https://github.com/robotology/ycm/pull/436).
* FindGraphviz: if available export version of the package from pkg-config (https://github.com/robotology/ycm/pull/438).

### Deprecated

Expand Down
Loading