From 6f7338cb0556e09539091e877a0105af718be26c Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Fri, 29 Jul 2022 20:41:38 +0200 Subject: [PATCH] Add pkg-config file --- CMakeLists.txt | 5 +++++ cppzmq.pc.in | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 cppzmq.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e17360..05001ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,11 @@ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Conf COMPATIBILITY AnyNewerVersion) set(CMAKE_SIZEOF_VOID_P ${CPPZMQ_SIZEOF_VOID_P}) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cppzmq.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/cppzmq.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppzmq.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(EXPORT ${PROJECT_NAME}-targets FILE ${PROJECT_NAME}Targets.cmake DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR}) diff --git a/cppzmq.pc.in b/cppzmq.pc.in new file mode 100644 index 0000000..3dc945d --- /dev/null +++ b/cppzmq.pc.in @@ -0,0 +1,9 @@ +prefix="@CMAKE_INSTALL_PREFIX@" +includedir="@CMAKE_INSTALL_FULL_INCLUDEDIR@" + +Name: @PROJECT_NAME@ +Description: C++ binding for libzmq +URL: https://github.com/zeromq/cppzmq +Version: @PROJECT_VERSION@ +Requires: libzmq +Cflags: -I"${includedir}" @pkg_config_defines@