diff options
author | Julian Andres Klode <jak@debian.org> | 2019-04-04 14:17:37 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2019-04-04 14:17:37 +0000 |
commit | 0ea7c474182f81e2b7d728569a2fd7b8fa915f3f (patch) | |
tree | c917703926593b89f0be93eb4caaf6ee42eadc53 /apt-inst | |
parent | aea842e1faf5aceebdc046d3d6957a12ae10142d (diff) | |
parent | 7c461f0396d413acb9a950f3df9ea6d062896cd7 (diff) |
Merge branch 'pkgconfig' into 'master'
Add PkgConfig on the apt-pkg and apt-inst libraries
See merge request apt-team/apt!20
Diffstat (limited to 'apt-inst')
-rw-r--r-- | apt-inst/CMakeLists.txt | 3 | ||||
-rw-r--r-- | apt-inst/apt-inst.pc.in | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/apt-inst/CMakeLists.txt b/apt-inst/CMakeLists.txt index 55950679a..e4e91e493 100644 --- a/apt-inst/CMakeLists.txt +++ b/apt-inst/CMakeLists.txt @@ -12,6 +12,8 @@ set(APT_INST_MAJOR ${MAJOR} PARENT_SCOPE) file(GLOB_RECURSE library "*.cc") file(GLOB_RECURSE headers "*.h") +configure_file(apt-inst.pc.in ${CMAKE_CURRENT_BINARY_DIR}/apt-inst.pc @ONLY) + # Create a library using the C++ files add_library(apt-inst SHARED ${library}) @@ -25,4 +27,5 @@ add_version_script(apt-inst) # Install the library and the headers install(TARGETS apt-inst LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES ${headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/apt-pkg) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apt-inst.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) flatify(${PROJECT_BINARY_DIR}/include/apt-pkg/ "${headers}") diff --git a/apt-inst/apt-inst.pc.in b/apt-inst/apt-inst.pc.in new file mode 100644 index 000000000..1d61a202f --- /dev/null +++ b/apt-inst/apt-inst.pc.in @@ -0,0 +1,9 @@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: apt-inst +Description: deb package format runtime library +Version: @PROJECT_VERSION@ +Libs: -L${libdir} -lapt-inst +Cflags: -I${includedir} +Requires: apt-pkg |