--- CMakeLists.txt.orig	2025-03-02 16:00:18.000000000 -0500
+++ CMakeLists.txt	2025-03-02 16:19:57.000000000 -0500
@@ -34,3 +34,18 @@
     add_executable(argparse_example argparse_example.cpp)
     target_link_libraries(argparse_example libargparse)
 endif()
+
+set(PROJ_PKGCONFIG_NAME "${CMAKE_PROJECT_NAME}.pc")
+set(PROJ_PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
+
+# generate pc file for pkg-config
+configure_file(
+  "${CMAKE_CURRENT_SOURCE_DIR}/${PROJ_PKGCONFIG_NAME}.in"
+  "${CMAKE_CURRENT_BINARY_DIR}/${PROJ_PKGCONFIG_NAME}"
+  @ONLY)
+
+include(GNUInstallDirs)
+install(
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJ_PKGCONFIG_NAME}"
+ DESTINATION "${PROJ_PKGCONFIG_INSTALL_DIR}"
+)
+
