From 5d50c15234b78597d78bcddc911ecb4cb9cc123b Mon Sep 17 00:00:00 2001 From: Matt Hoosier Date: Tue, 3 Mar 2020 09:25:25 -0600 Subject: Supply pkg-config files These are customary, and pretty straightforward to offer. --- kms++/CMakeLists.txt | 5 +++++ kms++/kms++.pc.in | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 kms++/kms++.pc.in (limited to 'kms++') diff --git a/kms++/CMakeLists.txt b/kms++/CMakeLists.txt index c02cc83..6e21fa5 100644 --- a/kms++/CMakeLists.txt +++ b/kms++/CMakeLists.txt @@ -24,6 +24,8 @@ target_include_directories(kms++ PUBLIC target_link_libraries(kms++ ${LIBDRM_LIBRARIES} ${LIBDRM_OMAP_LIBRARIES} fmt::fmt-header-only) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kms++.pc.in ${CMAKE_CURRENT_BINARY_DIR}/kms++.pc @ONLY) + # Set a dummy SOVERSION just to avoid having a naked .so file in the filesystem. # This version number doesn't make any promise about API/ABI stability. set_target_properties(kms++ PROPERTIES @@ -34,3 +36,6 @@ install(TARGETS kms++ LIBRARY DESTINATION lib ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include/kms++) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kms++.pc + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) diff --git a/kms++/kms++.pc.in b/kms++/kms++.pc.in new file mode 100644 index 0000000..60b5974 --- /dev/null +++ b/kms++/kms++.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_PREFIX@/lib +includedir=@CMAKE_INSTALL_PREFIX@/include + +Name: kms++ +Description: C++ library for Linux kernel mode setting +Version: 0.0.0 +Libs: -L${libdir} -lkms++ +Cflags: -I${includedir} -- cgit v1.2.3