[PATCH 3/4] kernel-shark: Check if Qt has been found when building the examples

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some of the examples depend on Qt. Check if Qt exists befor trying
to build these examples.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>
---
 kernel-shark/examples/CMakeLists.txt | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/kernel-shark/examples/CMakeLists.txt b/kernel-shark/examples/CMakeLists.txt
index 35e6b1e..032f305 100644
--- a/kernel-shark/examples/CMakeLists.txt
+++ b/kernel-shark/examples/CMakeLists.txt
@@ -20,10 +20,14 @@ message(STATUS "dataplot")
 add_executable(dplot          dataplot.cpp)
 target_link_libraries(dplot   kshark-plot)
 
-message(STATUS "widgetdemo")
-add_executable(widgetdemo          widgetdemo.cpp)
-target_link_libraries(widgetdemo   kshark-gui)
+if (Qt5Widgets_FOUND)
 
-message(STATUS "cmd_split")
-add_executable(cmd_split           cmd_split.cpp)
-target_link_libraries(cmd_split    kshark-gui)
+    message(STATUS "widgetdemo")
+    add_executable(widgetdemo          widgetdemo.cpp)
+    target_link_libraries(widgetdemo   kshark-gui)
+
+    message(STATUS "cmd_split")
+    add_executable(cmd_split           cmd_split.cpp)
+    target_link_libraries(cmd_split    kshark-gui)
+
+endif (Qt5Widgets_FOUND)
-- 
2.26.2




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux