Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 1 | From 9d47d2fd45c455339759dbfe9a0d6fd24b0a0fa1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Yi Zhao <yi.zhao@windriver.com> |
| 3 | Date: Wed, 24 Mar 2021 15:39:36 +0800 |
| 4 | Subject: [PATCH] tclap: add pkg-config file |
| 5 | |
| 6 | The tclap switched from autotools to CMake in 1.4.0 and drop the |
| 7 | pkg-config file tclap.pc. Some projects (e.g. ima-inspect) still require |
| 8 | it. So add it back. |
| 9 | |
| 10 | Upstream-Status: Pending |
| 11 | |
| 12 | Signed-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 | |
| 19 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 20 | index 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) |
| 35 | diff --git a/tclap.pc.in b/tclap.pc.in |
| 36 | new file mode 100644 |
| 37 | index 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 | -- |
| 49 | 2.17.1 |
| 50 | |