From 7c461f0396d413acb9a950f3df9ea6d062896cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Sun, 3 Jun 2018 16:37:44 +0100 Subject: Add pkg-config files for the apt-pkg and apt-inst libraries Closes: #439121 --- apt-pkg/CMakeLists.txt | 3 +++ apt-pkg/apt-pkg.pc.in | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 apt-pkg/apt-pkg.pc.in (limited to 'apt-pkg') diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index 64709ce34..92b488c65 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -29,6 +29,8 @@ execute_process(COMMAND grep "^#define APT_PKG_RELEASE" message(STATUS "Building libapt-pkg ${MAJOR} (release ${MINOR})") set(APT_PKG_MAJOR ${MAJOR} PARENT_SCOPE) # exporting for methods/CMakeLists.txt +configure_file(apt-pkg.pc.in ${CMAKE_CURRENT_BINARY_DIR}/apt-pkg.pc @ONLY) + # Definition of the C++ files used to build the library - note that this # is expanded at CMake time, so you have to rerun cmake if you add or remove # a file (you can just run cmake . in the build directory) @@ -67,6 +69,7 @@ add_version_script(apt-pkg) # Install the library and the header files install(TARGETS apt-pkg LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES ${headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/apt-pkg) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-pkg.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) flatify(${PROJECT_BINARY_DIR}/include/apt-pkg/ "${headers}") if(CMAKE_BUILD_TYPE STREQUAL "Coverage") diff --git a/apt-pkg/apt-pkg.pc.in b/apt-pkg/apt-pkg.pc.in new file mode 100644 index 000000000..c6491d921 --- /dev/null +++ b/apt-pkg/apt-pkg.pc.in @@ -0,0 +1,8 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: apt-pkg +Description: package management runtime library +Version: @PROJECT_VERSION@ +Libs: -L${libdir} -lapt-pkg -pthread +Cflags: -I${includedir} -- cgit v1.2.3