Linux-Trace-Devel Archive on
 help / color / Atom feed
From: "Yordan Karadzhov (VMware)" <>
	"Yordan Karadzhov (VMware)" <>
Subject: [PATCH v2 2/3] kernel-shark: Check if Qt has been found when building the examples
Date: Wed, 30 Sep 2020 18:07:40 +0300
Message-ID: <> (raw)
In-Reply-To: <>

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

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

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 35e6b1e..032f305 100644
--- a/examples/CMakeLists.txt
+++ b/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)

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 15:07 [PATCH v2 1/3] kernel-shark: Fix all warnings showing when bulding with gcc 10.2.1 Yordan Karadzhov (VMware)
2020-09-30 15:07 ` Yordan Karadzhov (VMware) [this message]
2020-09-30 15:07 ` [PATCH v2 3/3] kernel-shark: Fix symbol resolving during linking Yordan Karadzhov (VMware)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Trace-Devel Archive on

Archives are clonable:
	git clone --mirror linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ \
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone