summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2014-05-16 12:27:17 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2014-05-16 12:27:17 -0700
commit5974a3e57cc6874d55d19dcb02ac9d8161753ea1 (patch)
tree90ad08cd94853360126d5e27c8ebf5503541bf69 /cmake/Modules
parent432e3b75300a400e2e99dbe7e9aea58b6b2855b1 (diff)
parentb0bf3c71d4446297b6e26a0ae49d1e3a287b86c3 (diff)
Merge branch 'zeromq'
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/FindZeroMQ.cmake26
1 files changed, 26 insertions, 0 deletions
diff --git a/cmake/Modules/FindZeroMQ.cmake b/cmake/Modules/FindZeroMQ.cmake
new file mode 100644
index 0000000000..c1155c4cc5
--- /dev/null
+++ b/cmake/Modules/FindZeroMQ.cmake
@@ -0,0 +1,26 @@
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(PC_ZEROMQ "libzmq")
+
+FIND_PATH(ZEROMQ_INCLUDE_DIRS
+ NAMES zmq.h
+ HINTS ${PC_ZEROMQ_INCLUDE_DIR}
+ ${CMAKE_INSTALL_PREFIX}/include
+ PATHS
+ /usr/local/include
+ /usr/include
+)
+
+FIND_LIBRARY(ZEROMQ_LIBRARIES
+ NAMES zmq libzmq
+ HINTS ${PC_ZEROMQ_LIBDIR}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ ${CMAKE_INSTALL_PREFIX}/lib64
+ PATHS
+ ${ZEROMQ_INCLUDE_DIRS}/../lib
+ /usr/local/lib
+ /usr/lib
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZEROMQ DEFAULT_MSG ZEROMQ_LIBRARIES ZEROMQ_INCLUDE_DIRS)
+MARK_AS_ADVANCED(ZEROMQ_LIBRARIES ZEROMQ_INCLUDE_DIRS)