Skip to content

Commit

Permalink
Merge pull request #564 from stephanlachnit/p-add-pkg-config
Browse files Browse the repository at this point in the history
Add pkg-config file
  • Loading branch information
gummif committed Aug 18, 2022
2 parents 361156a + 6f7338c commit e70dd63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
9 changes: 9 additions & 0 deletions cppzmq.pc.in
Original file line number Diff line number Diff line change
@@ -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@

0 comments on commit e70dd63

Please sign in to comment.