@@ -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)
Some of the examples depend on Qt. Check is Qt exists befor trying to build these examples. Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> --- examples/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)