| 1 |
cmake_minimum_required(VERSION 3.12 FATAL_ERROR) |
| 2 |
project(test_2598 C) |
| 3 |
|
| 4 |
# listen to `graphviz_ROOT` environment variable during `find_package(graphviz)` |
| 5 |
cmake_policy(SET CMP0074 NEW) |
| 6 |
|
| 7 |
# find Graphviz libraries |
| 8 |
find_package(graphviz REQUIRED) |
| 9 |
|
| 10 |
# define an application that uses libcgraph |
| 11 |
add_executable(cgraph_app cgraph_app.c) |
| 12 |
target_link_libraries(cgraph_app PRIVATE graphviz::cgraph) |
| 13 |
|
| 14 |
# define an application that uses libgvc |
| 15 |
add_executable(gvc_app gvc_app.c) |
| 16 |
target_link_libraries(gvc_app PRIVATE graphviz::gvc) |
| 17 |
|
| 18 |
# define an application that uses libpathplan |
| 19 |
add_executable(pathplan_app pathplan_app.c) |
| 20 |
target_link_libraries(pathplan_app PRIVATE graphviz::pathplan) |
| 21 |
|
| 22 |
# define an application that uses libxdot |
| 23 |
add_executable(xdot_app xdot_app.c) |
| 24 |
target_link_libraries(xdot_app PRIVATE graphviz::xdot) |