diff mbox series

[2/3] kernel-shark: Build "dataplot" only if OpenGL and GLUT are found

Message ID 20210316173922.657865-2-y.karadz@gmail.com (mailing list archive)
State Accepted
Headers show
Series [1/3] kernel-shark: Build the plugins together with the GUI. | expand

Commit Message

Yordan Karadzhov March 16, 2021, 5:39 p.m. UTC
The "dataplot" example depends from those two packages.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 examples/CMakeLists.txt | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index bc17635..c2f4c01 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -20,9 +20,13 @@  message(STATUS "confogio")
 add_executable(confio          configio.c)
 target_link_libraries(confio   kshark)
 
-message(STATUS "dataplot")
-add_executable(dplot          dataplot.cpp)
-target_link_libraries(dplot   kshark-plot)
+if (OPENGL_FOUND AND GLUT_FOUND)
+
+    message(STATUS "dataplot")
+    add_executable(dplot          dataplot.cpp)
+    target_link_libraries(dplot   kshark-plot)
+
+endif (OPENGL_FOUND AND GLUT_FOUND)
 
 if (Qt5Widgets_FOUND AND TT_FONT_FILE)