Simplify GraphViz version detection by using CMake-native facilities
AbandonedPublic

Authored by adridg on Sep 28 2017, 12:09 PM.

Details

Reviewers
jriddell
Summary
  • Pass required version in find_package()
  • Leave version comparisons to find_package_handle_standard_args()
  • Use DOT version instead of pkg-config reported version if DOT found
  • Fix FOUND variable name (FindGraphviz.cmake shouldn't use GraphViz)
Test Plan

Builds for me on FreeBSD. By playing with the version number passed
to find_package() you can get the cmake-step to fail with a useful
error message (while previously the whole version-checking stuff was
just skipped).

Diff Detail

Repository
R491 KGraphViewer
Branch
polish-cmake
Lint
No Linters Available
Unit
No Unit Test Coverage
adridg created this revision.Sep 28 2017, 12:09 PM
adridg abandoned this revision.Sep 28 2017, 9:13 PM

The fix is to make ${graphviz_LIBRARIES} contain the full paths to the libraries (as is common with find_library() calls) instead of naming libs suitable for use with -l. This requires another approach (I';ll still suggest fixing up the version-checking code,though).