@@ -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("")
@@ -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
new file mode 100644
@@ -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
@@ -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)
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