From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org,
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH v2 26/27] kernel-shark: Add pkg-config configuration for libkshark
Date: Thu, 11 Feb 2021 12:32:04 +0200 [thread overview]
Message-ID: <20210211103205.418588-27-y.karadz@gmail.com> (raw)
In-Reply-To: <20210211103205.418588-1-y.karadz@gmail.com>
Add auto-generated pkg-config setup file to install for pkg-config.
To be used for building against libkshark.
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
CMakeLists.txt | 3 +++
build/cmake_clean.sh | 1 +
build/libkshark.pc.cmake | 10 ++++++++++
src/CMakeLists.txt | 6 ++++++
4 files changed, 20 insertions(+)
create mode 100644 build/libkshark.pc.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ca33fd..efcccb1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -167,4 +167,7 @@ configure_file(${KS_DIR}/build/ks.desktop.cmake
configure_file(${KS_DIR}/build/org.freedesktop.kshark-record.policy.cmake
${KS_DIR}/org.freedesktop.kshark-record.policy)
+configure_file(${KS_DIR}/build/libkshark.pc.cmake
+ ${KS_DIR}/libkshark.pc @ONLY)
+
message("")
diff --git a/build/cmake_clean.sh b/build/cmake_clean.sh
index 2ca1136..d645c32 100755
--- a/build/cmake_clean.sh
+++ b/build/cmake_clean.sh
@@ -12,6 +12,7 @@ rm -rf Testing/
rm -f ../tests/*.dat
rm -f ../lib/*
rm ../kernelshark.desktop
+rm ../libkshark.pc
rm ../org.freedesktop.kshark-record.policy
rm -f ../src/KsCmakeDef.hpp
rm -f CMakeDoxyfile.in
diff --git a/build/libkshark.pc.cmake b/build/libkshark.pc.cmake
new file mode 100644
index 0000000..ad4ce34
--- /dev/null
+++ b/build/libkshark.pc.cmake
@@ -0,0 +1,10 @@
+prefix=@_INSTALL_PREFIX@
+libdir=@_LIBDIR@
+includedir=${prefix}/include/@KS_APP_NAME@
+
+Name: libkshark
+URL: https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/
+Description: Library for accessing ftrace file system
+Version: @KS_VERSION_STRING@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lkshark
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4158901..6a6eda1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -133,6 +133,12 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND AND TT_FONT_FILE)
DESTINATION ${_INSTALL_PREFIX}/bin/
COMPONENT kernelshark)
+ execute_process(COMMAND bash "-c" "pkg-config --variable pc_path pkg-config | cut -f 1 -d: -z"
+ OUTPUT_VARIABLE PKG_CONGIG_DIR)
+ install(FILES "${KS_DIR}/libkshark.pc"
+ DESTINATION ${PKG_CONGIG_DIR}
+ COMPONENT libkshark-devel)
+
endif (Qt5Widgets_FOUND AND Qt5Network_FOUND AND TT_FONT_FILE)
add_subdirectory(plugins)
--
2.25.1
next prev parent reply other threads:[~2021-02-11 10:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 10:31 [PATCH v2 00/27] Complete the KernelShark v2 transformation Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 01/27] kernel-shark: Add get_stream_object() Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 02/27] kernel-shark: Do proper reset in kshark_close_all() Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 03/27] kernel-shark: Restore the counting of event handlers Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 04/27] kernel-shark: Fix a misleading comment Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 05/27] kernel-shark: Count the number of readout interfaces Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 06/27] kernel-shark: Update KsUtils Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 07/27] kernel-shark: Update KsModels and KsSearchFSM Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 08/27] kernel-shark: Add trace data files for CI testing Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 09/27] kernel-shark: Add plugin tests Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 10/27] kernel-shark: Add model tests Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 11/27] kernel-shark: Update KsWidgetsLib Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 12/27] kernel-shark: Add combo point to Mark Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 13/27] kernel-shark: Add new methods to KsPlot::Mark Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 14/27] kernel-shark: Update the plotting example Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 15/27] kernel-shark: Search for font with Cmake at pre-build Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 16/27] kernel-shark: Update KsDualMarker and KsGLWidget Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 17/27] kernel-shark: Update KsTraceGraph and KsQuickContextMenu Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 18/27] kernel-shark: Update KsTraceViewer Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 19/27] kernel-shark: Update KsAdvFilteringDialog Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 20/27] kernel-shark: Update KsCaptureDialog Yordan Karadzhov (VMware)
2021-02-11 10:31 ` [PATCH v2 21/27] kernel-shark: Update KsSession Yordan Karadzhov (VMware)
2021-02-11 10:32 ` [PATCH v2 22/27] kernel-shark: Update MissedEvents plugin Yordan Karadzhov (VMware)
2021-02-11 10:32 ` [PATCH v2 23/27] kernel-shark: Update KsMainWindow and kernelshark.cpp Yordan Karadzhov (VMware)
2021-02-11 10:32 ` [PATCH v2 24/27] kernel-shark: Clickable sched_event plugin shapes Yordan Karadzhov (VMware)
2021-02-11 10:32 ` [PATCH v2 25/27] kernel-shark: Show Task plots from command lime Yordan Karadzhov (VMware)
2021-02-11 10:32 ` Yordan Karadzhov (VMware) [this message]
2021-02-11 10:32 ` [PATCH v2 27/27] kernel-shark: Install libkshark-tepdata.h Yordan Karadzhov (VMware)
2021-02-11 15:02 ` [PATCH v2 00/27] Complete the KernelShark v2 transformation Steven Rostedt
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210211103205.418588-27-y.karadz@gmail.com \
--to=y.karadz@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).