From 3a73f81ff749c3e9786d704d0d3b5fd3dc2655a2 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Tue, 19 Jan 2021 07:11:38 +0100 Subject: [PATCH] add pkg-config support --- CMakeLists.txt | 10 ++++++++++ libargtable2.pc.in | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 libargtable2.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index b047f72..eae5b56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,3 +19,13 @@ install(TARGETS ${PROJECT_NAME} install( DIRECTORY include/sheitmann DESTINATION include ) + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/libargtable2.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libargtable2.pc +@ONLY) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libargtable2.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff --git a/libargtable2.pc.in b/libargtable2.pc.in new file mode 100644 index 0000000..58bdadf --- /dev/null +++ b/libargtable2.pc.in @@ -0,0 +1,11 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/include + +Name: libargtable2 +Description: A makestuff build of Stewart Heitmann's argtable2. +Version: 20170708 +Libs: -L${libdir} -largtable2 +Cflags: -I${includedir} +