aboutsummaryrefslogtreecommitdiff
path: root/cmake/macros
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-03-22 00:07:04 +0100
committerShauren <shauren.trinity@gmail.com>2016-03-22 00:07:04 +0100
commitfb8f66f93667112f41ba1a33d1d25527cc948e65 (patch)
tree6faa6ad6cdee72daddaa9d01f42732117d9031c3 /cmake/macros
parentf837fc875a6d8e00ade132ba3279ecf4b143ec76 (diff)
Buildsystem: Removed unneeded FindZMQ script
Diffstat (limited to 'cmake/macros')
-rw-r--r--cmake/macros/FindZMQ.cmake89
1 files changed, 0 insertions, 89 deletions
diff --git a/cmake/macros/FindZMQ.cmake b/cmake/macros/FindZMQ.cmake
deleted file mode 100644
index 4f415c539bf..00000000000
--- a/cmake/macros/FindZMQ.cmake
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# Find the ZMQ includes and library
-#
-
-# This module defines
-# ZMQ_INCLUDE_DIR, where to find zmq.h
-# ZMQ_LIBRARY, the library needed to use ZMQ
-# ZMQ_FOUND, if false, you cannot build anything that requires ZMQ.
-
-set(ZMQ_FOUND 0)
-
-if (PLATFORM EQUAL 64)
- set(ZMQ_REGISTRY_PATH
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ZeroMQ (x64);DisplayIcon]"
- )
-else()
- set(ZMQ_REGISTRY_PATH
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ZeroMQ;DisplayIcon]"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ZeroMQ;DisplayIcon]"
- )
-endif()
-
-find_path(ZMQ_ROOT_DIR
- NAMES
- include/zmq.h
- HINTS
- ${ZMQ_REGISTRY_PATH}
- PATHS
- /usr
- /usr/local
-)
-
-find_path(ZMQ_INCLUDE_DIR zmq.h ${ZMQ_ROOT_DIR}/include)
-
-if (MSVC)
- # Read registry key holding version
- if (PLATFORM EQUAL 64)
- get_filename_component(ZMQ_NAME "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ZeroMQ (x64);DisplayVersion]" NAME)
- else()
- get_filename_component(ZMQ_NAME "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ZeroMQ;DisplayVersion]" NAME)
- if (${ZMQ_NAME} MATCHES "registry") # if key was not found, the string "registry" is returned
- get_filename_component(ZMQ_NAME "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ZeroMQ;DisplayVersion]" NAME)
- endif()
- endif()
-
- # Replace dots with underscores
- string(REGEX REPLACE "\\." "_" ZMQ_NAME ${ZMQ_NAME})
-
- # Get Visual studio version number
- string(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" ZMQ_VS_VERSION ${CMAKE_GENERATOR})
-
- # HACK - zmq doesnt ship libs for VS 2015
- if (${ZMQ_VS_VERSION} EQUAL 14)
- set(ZMQ_VS_VERSION 12)
- endif()
-
- if (${ZMQ_NAME} MATCHES "registry") # if key was not found, the string "registry" is returned
- set(_ZMQ_VERSIONS "4_0_4" "4_0_3" "4_0_2" "4_0_1" "4_0_0" "3_2_5" "3_2_4" "3_2_3" "3_2_2" "3_2_1" "3_2_0" "3_1_0")
- set(ZMQ_LIBRARY_NAME)
- foreach(ver ${_ZMQ_VERSIONS})
- list(APPEND ZMQ_LIBRARY_NAME "libzmq-v${ZMQ_VS_VERSION}0-mt-${ver}")
- endforeach()
- else()
- # Format ZMQ library file name
- set(ZMQ_LIBRARY_NAME "libzmq-v${ZMQ_VS_VERSION}0-mt-${ZMQ_NAME}")
- endif()
-endif()
-
-find_library(ZMQ_LIBRARY
- NAMES
- zmq
- ${ZMQ_LIBRARY_NAME}
- PATHS
- /lib
- /usr/lib
- /usr/local/lib
- "${ZMQ_ROOT_DIR}/lib"
-)
-
-if (ZMQ_INCLUDE_DIR AND ZMQ_LIBRARY AND NOT ZMQ_LIBRARY-NOTFOUND)
- set(ZMQ_FOUND 1)
- message(STATUS "Found ZMQ library: ${ZMQ_LIBRARY}")
- message(STATUS "Found ZMQ headers: ${ZMQ_INCLUDE_DIR}")
-else()
- message(FATAL_ERROR "Could not find ZMQ libraries/headers! Please install ZMQ with libraries and headers")
-endif()
-
-# show the ZMQ_INCLUDE_DIR and ZMQ_LIBRARY variables only in the advanced view
-mark_as_advanced(ZMQ_ROOT_DIR ZMQ_INCLUDE_DIR ZMQ_LIBRARY ZMQ_FOUND)