blob: 58c9aec088bd087ac300b8c5e6ad84f9e01bcceb [file] [log] [blame]
Andrew Geissler32b11992021-03-31 13:37:05 -05001From 9d47d2fd45c455339759dbfe9a0d6fd24b0a0fa1 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Wed, 24 Mar 2021 15:39:36 +0800
4Subject: [PATCH] tclap: add pkg-config file
5
6The tclap switched from autotools to CMake in 1.4.0 and drop the
7pkg-config file tclap.pc. Some projects (e.g. ima-inspect) still require
8it. So add it back.
9
10Upstream-Status: Pending
11
12Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
13---
14 CMakeLists.txt | 5 +++++
15 tclap.pc.in | 7 +++++++
16 2 files changed, 12 insertions(+)
17 create mode 100644 tclap.pc.in
18
19diff --git a/CMakeLists.txt b/CMakeLists.txt
20index c2c9a26..b56eac7 100644
21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt
23@@ -25,6 +25,11 @@ install(FILES "${PROJECT_BINARY_DIR}/tclap/TCLAPConfig.h"
24 DESTINATION include/tclap
25 )
26
27+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tclap.pc.in
28+ ${CMAKE_CURRENT_BINARY_DIR}/tclap.pc @ONLY)
29+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tclap.pc
30+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
31+
32 add_subdirectory(docs)
33 add_subdirectory(examples)
34 add_subdirectory(tests)
35diff --git a/tclap.pc.in b/tclap.pc.in
36new file mode 100644
37index 0000000..ef51c94
38--- /dev/null
39+++ b/tclap.pc.in
40@@ -0,0 +1,7 @@
41+prefix=@CMAKE_INSTALL_PREFIX@
42+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
43+
44+Name: tclap
45+Description: Templatized C++ Command Line Parser
46+Version: @PROJECT_VERSION@
47+Cflags: -I${includedir}
48--
492.17.1
50