Skip to content

Commit

Permalink
Problem: CMake find package support was broken
Browse files Browse the repository at this point in the history
Solution: regenerate via zproject.
  • Loading branch information
hintjens committed Jan 20, 2016
1 parent f9cb084 commit 82b8161
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Findczmq.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

if (NOT MSVC)
include(FindPkgConfig)
pkg_check_modules(PC_CZMQ "czmq")
pkg_check_modules(PC_CZMQ "libczmq")
if (NOT PC_CZMQ_FOUND)
pkg_check_modules(PC_CZMQ "czmq")
pkg_check_modules(PC_CZMQ "libczmq")
endif (NOT PC_CZMQ_FOUND)
if (PC_CZMQ_FOUND)
# some libraries install the headers is a subdirectory of the include dir
Expand Down
4 changes: 2 additions & 2 deletions Findlibsodium.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

if (NOT MSVC)
include(FindPkgConfig)
pkg_check_modules(PC_LIBSODIUM "sodium")
pkg_check_modules(PC_LIBSODIUM "libsodium")
if (NOT PC_LIBSODIUM_FOUND)
pkg_check_modules(PC_LIBSODIUM "sodium")
pkg_check_modules(PC_LIBSODIUM "libsodium")
endif (NOT PC_LIBSODIUM_FOUND)
if (PC_LIBSODIUM_FOUND)
# some libraries install the headers is a subdirectory of the include dir
Expand Down
4 changes: 2 additions & 2 deletions Findlibzmq.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

if (NOT MSVC)
include(FindPkgConfig)
pkg_check_modules(PC_LIBZMQ "zmq")
pkg_check_modules(PC_LIBZMQ "libzmq")
if (NOT PC_LIBZMQ_FOUND)
pkg_check_modules(PC_LIBZMQ "zmq")
pkg_check_modules(PC_LIBZMQ "libzmq")
endif (NOT PC_LIBZMQ_FOUND)
if (PC_LIBZMQ_FOUND)
# some libraries install the headers is a subdirectory of the include dir
Expand Down
13 changes: 13 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ LIBS="${PREVIOUS_LIBS}"
zyre_on_mingw32="no"
zyre_on_cygwin="no"
zyre_on_android="no"
zyre_on_linux="no"
zyre_on_gnu="no"

# Host specific checks
AC_CANONICAL_HOST
Expand Down Expand Up @@ -266,6 +268,7 @@ case "${host_os}" in
# Define on Linux to enable all library features
CPPFLAGS="-D_GNU_SOURCE -DLINUX $CPPFLAGS"
AC_DEFINE(ZYRE_HAVE_LINUX, 1, [Have Linux OS])
zyre_on_linux="yes"

case "${host_os}" in
*android*)
Expand Down Expand Up @@ -324,6 +327,14 @@ case "${host_os}" in
AC_DEFINE(ZYRE_HAVE_CYGWIN, 1, [Have Cygwin])
zyre_on_cygwin="yes"
;;
gnu*)
# Define on GNU/Hurd to enable all library features
if test "x$GXX" = "xyes"; then
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
fi
AC_DEFINE(ZYRE_HAVE_GNU, 1, [Have GNU/Hurd OS])
zyre_on_gnu="yes"
;;
*)
AC_MSG_ERROR([unsupported system: ${host_os}.])
;;
Expand Down Expand Up @@ -362,6 +373,8 @@ AM_CONDITIONAL(ENABLE_SHARED, test "x$enable_shared" = "xyes")
AM_CONDITIONAL(ON_MINGW, test "x$zyre_on_mingw32" = "xyes")
AM_CONDITIONAL(ON_CYGWIN, test "x$zyre_on_cygwin" = "xyes")
AM_CONDITIONAL(ON_ANDROID, test "x$zyre_on_android" = "xyes")
AM_CONDITIONAL(ON_LINUX, test "x$zyre_on_linux" = "xyes")
AM_CONDITIONAL(ON_GNU, test "x$zyre_on_gnu" = "xyes")
AM_CONDITIONAL(INSTALL_MAN, test "x$zyre_install_man" = "xyes")
AM_CONDITIONAL(BUILD_DOC, test "x$zyre_build_doc" = "xyes")

Expand Down
10 changes: 5 additions & 5 deletions include/zyre.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,36 @@ ZYRE_EXPORT int

#ifdef WITH_DRAFTS
// Return zlist of current peer ids.
// The caller is responsible for destroying the return value when finished with it.
// The caller owns the return value and must destroy it when done with it.
ZYRE_EXPORT zlist_t *
zyre_peers (zyre_t *self);
#endif // WITH_DRAFTS

#ifdef WITH_DRAFTS
// Return zlist of currently joined groups.
// The caller is responsible for destroying the return value when finished with it.
// The caller owns the return value and must destroy it when done with it.
ZYRE_EXPORT zlist_t *
zyre_own_groups (zyre_t *self);
#endif // WITH_DRAFTS

#ifdef WITH_DRAFTS
// Return zlist of groups known through connected peers.
// The caller is responsible for destroying the return value when finished with it.
// The caller owns the return value and must destroy it when done with it.
ZYRE_EXPORT zlist_t *
zyre_peer_groups (zyre_t *self);
#endif // WITH_DRAFTS

#ifdef WITH_DRAFTS
// Return the endpoint of a connected peer.
// The caller is responsible for destroying the return value when finished with it.
// The caller owns the return value and must destroy it when done with it.
ZYRE_EXPORT char *
zyre_peer_address (zyre_t *self, const char *peer);
#endif // WITH_DRAFTS

#ifdef WITH_DRAFTS
// Return the value of a header of a conected peer.
// Returns null if peer or key doesn't exits.
// The caller is responsible for destroying the return value when finished with it.
// The caller owns the return value and must destroy it when done with it.
ZYRE_EXPORT char *
zyre_peer_header_value (zyre_t *self, const char *peer, const char *name);
#endif // WITH_DRAFTS
Expand Down

0 comments on commit 82b8161

Please sign in to comment.