From 3f4ea2de9fe2d38918d549f5ef8a9c3eb39a3404 Mon Sep 17 00:00:00 2001 From: Eero Aaltonen Date: Tue, 13 Feb 2024 12:47:39 +0200 Subject: [PATCH] libteeacl: add pkgconfig file: teeacl.pc Add a pkgconfig file to libteeacl, so that the library and its headers can be found from wherever they have been installed. Signed-off-by: Eero Aaltonen Acked-by: Jerome Forissier --- libteeacl/CMakeLists.txt | 6 ++++++ libteeacl/teeacl.pc.in | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 libteeacl/teeacl.pc.in diff --git a/libteeacl/CMakeLists.txt b/libteeacl/CMakeLists.txt index ce78058e..d3cacea2 100644 --- a/libteeacl/CMakeLists.txt +++ b/libteeacl/CMakeLists.txt @@ -18,6 +18,8 @@ set(SRC ################################################################################ add_library(teeacl ${SRC}) +configure_file(teeacl.pc.in teeacl.pc @ONLY) + set_target_properties(teeacl PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} @@ -51,3 +53,7 @@ install(TARGETS teeacl ) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/teeacl.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" +) diff --git a/libteeacl/teeacl.pc.in b/libteeacl/teeacl.pc.in new file mode 100644 index 00000000..92a70736 --- /dev/null +++ b/libteeacl/teeacl.pc.in @@ -0,0 +1,12 @@ +prefix="@CMAKE_INSTALL_PREFIX@" +exec_prefix="${prefix}" +libdir="${prefix}/lib" +includedir="${prefix}/include" + +Name: @PROJECT_NAME@ +Description: Access Control List utilities for teec library +URL: @CMAKE_PROJECT_HOMEPAGE_URL@ +Version: @PROJECT_VERSION@ +Requires: uuid >= 2.34 +Cflags: -I"${includedir}" +Libs: -L"${libdir}" -lteeacl