Skip to content

Commit

Permalink
libteeacl: add pkgconfig file: teeacl.pc
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jerome Forissier <[email protected]>
  • Loading branch information
eaaltonen committed Mar 12, 2024
1 parent 96ef722 commit 3f4ea2d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libteeacl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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"
)
12 changes: 12 additions & 0 deletions libteeacl/teeacl.pc.in
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3f4ea2d

Please sign in to comment.