Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake not installing libzmqpp.pc to prefix path #248

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Individual Contributors

Author: Ben Gray <ben@benjamg.com>
Author: Dmitry Odzerikho <dmitry.odzerikho@gmail.com>
Author: Egor Poleshko <somedevfox@gmail.com>
Author: Michi Henning <michi.henning@canonical.com>
Author: Pieter Hintjens <ph@imatix.com>
Author: Rob Hubbard <rob.hubbard@datasift.com>
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ if( ZMQPP_BUILD_TESTS )
add_test( zmqpp-test zmqpp-test-runner --log-level=test-suite )
endif()

# Configure pkg-config file
# -------------------------
configure_file(src/libzmqpp.pc ${CMAKE_BINARY_DIR}/libzmqpp.pc)

# Install
# -------
Expand All @@ -245,3 +248,7 @@ install(DIRECTORY src/zmqpp DESTINATION include/
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/zmqpp_export.h"
DESTINATION "include")

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/libzmqpp.pc"
DESTINATION "lib/pkgconfig")
12 changes: 6 additions & 6 deletions src/libzmqpp.pc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
prefix=/usr/local
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_PREFIX@/lib
includedir=@CMAKE_INSTALL_PREFIX@/include

Name: libzmqpp
Description: The high-level C++ binding for 0MQ
Version:

Requires: libzmq

Libs: -L${libdir} -lzmqpp
Cflags: -I${includedir}
Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lzmqpp
Cflags: -I@CMAKE_INSTALL_PREFIX@/include