Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
34a1292e
Commit
34a1292e
authored
Sep 27, 2016
by
Constantin Rack
Committed by
GitHub
Sep 27, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2134 from bluca/pkg-config-static
Problem: pkgconfig file does not support static link
parents
131a2627
6d941160
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
4 deletions
+26
-4
CMakeLists.txt
CMakeLists.txt
+5
-0
configure.ac
configure.ac
+17
-2
libzmq.pc.cmake.in
src/libzmq.pc.cmake.in
+2
-1
libzmq.pc.in
src/libzmq.pc.in
+2
-1
No files found.
CMakeLists.txt
View file @
34a1292e
...
...
@@ -16,6 +16,10 @@ if(COMPILER_SUPPORTS_C11)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-std=gnu11"
)
endif
()
# Will be used to add flags to pkg-config useful when apps want to statically link
set
(
pkg_config_requires_private
""
)
set
(
pkg_config_libs_private
""
)
option
(
WITH_OPENPGM
"Build with support for OpenPGM"
OFF
)
option
(
WITH_VMCI
"Build with support for VMware VMCI socket"
OFF
)
...
...
@@ -45,6 +49,7 @@ elseif (WITH_LIBSODIUM)
endif
()
set
(
ZMQ_USE_LIBSODIUM 1
)
set
(
ZMQ_HAVE_CURVE 1
)
list
(
APPEND pkg_config_requires_private
"libsodium"
)
else
()
message
(
FATAL_ERROR
"libsodium is not installed. Install it, then run CMake again"
)
...
...
configure.ac
View file @
34a1292e
...
...
@@ -140,6 +140,10 @@ libzmq_on_gnu="no"
# Set some default features required by ZeroMQ code
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -Wno-long-long $CPPFLAGS"
# Will be used to add flags to pkg-config useful when apps want to statically link
PKGCFG_REQUIRES_PRIVATE=""
PKGCFG_LIBS_PRIVATE=""
# For host type checks
AC_CANONICAL_HOST
...
...
@@ -450,6 +454,8 @@ elif test "x$with_libsodium" = "xyes"; then
libzmq_werror="no"
;;
esac
PKGCFG_REQUIRES_PRIVATE="$PKGCFG_REQUIRES_PRIVATE libsodium"
else
AC_MSG_NOTICE([Using tweetnacl for CURVE security])
AC_DEFINE(ZMQ_HAVE_CURVE, [1], [Using curve encryption])
...
...
@@ -471,9 +477,14 @@ AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm],
# conditionally require pgm package
if test "x$with_pgm_ext" != "xno"; then
PKG_CHECK_MODULES([pgm], [openpgm-5.2 >= 5.2], [ have_pgm_library="yes" ],
PKG_CHECK_MODULES([pgm], [openpgm-5.2 >= 5.2], [
have_pgm_library="yes"
PKGCFG_REQUIRES_PRIVATE="$PKGCFG_REQUIRES_PRIVATE openpgm-5.2" ],
[PKG_CHECK_MODULES([pgm], [openpgm-5.1 >= 5.1],
[ have_pgm_library="yes" ])])
[
have_pgm_library="yes"
PKGCFG_REQUIRES_PRIVATE="$PKGCFG_REQUIRES_PRIVATE openpgm-5.1"
])])
fi
if test "x$have_pgm_library" = "xyes"; then
...
...
@@ -504,6 +515,7 @@ if test "x$with_norm_ext" != "xno"; then
LIBZMQ_EXTRA_LDFLAGS="-L${norm_path}/lib ${LIBZMQ_EXTRA_LDFLAGS}"
fi
LIBS="-L${norm_path}/lib -lnorm $LIBS"
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE libnorm.a"
else
AC_MSG_RESULT([no])
fi
...
...
@@ -649,6 +661,9 @@ AC_SUBST(LIBZMQ_EXTRA_LDFLAGS)
AC_SUBST(LIBZMQ_VMCI_CXXFLAGS)
AC_SUBST(LIBZMQ_VMCI_LDFLAGS)
AC_SUBST(pkg_config_requires_private, $PKGCFG_REQUIRES_PRIVATE)
AC_SUBST(pkg_config_libs_private, $PKGCFG_LIBS_PRIVATE)
# set pkgconfigdir, allow override
AC_ARG_WITH([pkgconfigdir],
AS_HELP_STRING([--with-pkgconfigdir=PATH],
...
...
src/libzmq.pc.cmake.in
View file @
34a1292e
...
...
@@ -7,5 +7,6 @@ Name: libzmq
Description: 0MQ c++ library
Version: @ZMQ_VERSION_MAJOR@.@ZMQ_VERSION_MINOR@.@ZMQ_VERSION_PATCH@
Libs: -L${libdir} -lzmq
Libs.private: -lstdc++
Libs.private: -lstdc++ @pkg_config_libs_private@
Requires.private: @pkg_config_requires_private@
Cflags: -I${includedir} @pkg_config_defines@
src/libzmq.pc.in
View file @
34a1292e
...
...
@@ -7,5 +7,6 @@ Name: libzmq
Description: 0MQ c++ library
Version: @VERSION@
Libs: -L${libdir} -lzmq
Libs.private: -lstdc++
Libs.private: -lstdc++ @pkg_config_libs_private@
Requires.private: @pkg_config_requires_private@
Cflags: -I${includedir} @pkg_config_defines@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment