mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Depend on AZMQ
This commit is contained in:
parent
35dd9578aa
commit
da070a407e
|
@ -67,6 +67,8 @@ if(BUILD_OFI_TRANSPORT)
|
||||||
VERSION ${asiofi_OFI_VERSION}
|
VERSION ${asiofi_OFI_VERSION}
|
||||||
COMPONENTS ${asiofi_OFI_COMPONENTS}
|
COMPONENTS ${asiofi_OFI_COMPONENTS}
|
||||||
)
|
)
|
||||||
|
find_package2(PRIVATE AZMQ REQUIRED)
|
||||||
|
set(PROJECT_AZMQ_VERSION 1.0.2)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_NANOMSG_TRANSPORT)
|
if(BUILD_NANOMSG_TRANSPORT)
|
||||||
|
@ -195,6 +197,11 @@ if(BUILD_DDS_PLUGIN)
|
||||||
DESTINATION ${PROJECT_INSTALL_CMAKEMODDIR}
|
DESTINATION ${PROJECT_INSTALL_CMAKEMODDIR}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
if(BUILD_OFI_TRANSPORT)
|
||||||
|
install(FILES cmake/FindAZMQ.cmake
|
||||||
|
DESTINATION ${PROJECT_INSTALL_CMAKEMODDIR}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
if(BUILD_DOCS)
|
if(BUILD_DOCS)
|
||||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/doxygen/html
|
install(DIRECTORY ${CMAKE_BINARY_DIR}/doxygen/html
|
||||||
DESTINATION ${PROJECT_INSTALL_DATADIR}/docs
|
DESTINATION ${PROJECT_INSTALL_DATADIR}/docs
|
||||||
|
@ -299,9 +306,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
message(STATUS " ${BWhite}nanomsg_transport${CR} ${nn_summary}")
|
message(STATUS " ${BWhite}nanomsg_transport${CR} ${nn_summary}")
|
||||||
if(BUILD_OFI_TRANSPORT)
|
if(BUILD_OFI_TRANSPORT)
|
||||||
set(ofi_summary "${BGreen}YES${CR} EXPERIMENTAL (requires C++17) (disable with ${BMagenta}-DBUILD_OFI_TRANSPORT=OFF${CR})")
|
set(ofi_summary "${BGreen}YES${CR} EXPERIMENTAL (requires C++17, Linux) (disable with ${BMagenta}-DBUILD_OFI_TRANSPORT=OFF${CR})")
|
||||||
else()
|
else()
|
||||||
set(ofi_summary "${BRed} NO${CR} EXPERIMENTAL (requires C++17) (default, enable with ${BMagenta}-DBUILD_OFI_TRANSPORT=ON${CR})")
|
set(ofi_summary "${BRed} NO${CR} EXPERIMENTAL (requires C++17, Linux) (default, enable with ${BMagenta}-DBUILD_OFI_TRANSPORT=ON${CR})")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS " ${BWhite}ofi_transport${CR} ${ofi_summary}")
|
message(STATUS " ${BWhite}ofi_transport${CR} ${ofi_summary}")
|
||||||
if(BUILD_DDS_PLUGIN)
|
if(BUILD_DDS_PLUGIN)
|
||||||
|
|
57
cmake/FindAZMQ.cmake
Normal file
57
cmake/FindAZMQ.cmake
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
################################################################################
|
||||||
|
# Copyright (C) 2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
||||||
|
# #
|
||||||
|
# This software is distributed under the terms of the #
|
||||||
|
# GNU Lesser General Public Licence (LGPL) version 3, #
|
||||||
|
# copied verbatim in the file "LICENSE" #
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# ###########################
|
||||||
|
# # Locate the AZMQ library #
|
||||||
|
# ###########################
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# find_package(AZMQ [version] [QUIET] [REQUIRED])
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Defines the following variables:
|
||||||
|
#
|
||||||
|
# AZMQ_FOUND - Found the ZeroMQ library
|
||||||
|
# AZMQ_INCLUDE_DIR (CMake cache) - Include directory
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Accepts the following variables as hints for installation directories:
|
||||||
|
#
|
||||||
|
# AZMQ_ROOT (CMake var, ENV var)
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# If the above variables are not defined, or if ZeroMQ could not be found there,
|
||||||
|
# it will look for it in the system directories. Custom ZeroMQ installations
|
||||||
|
# will always have priority over system ones.
|
||||||
|
#
|
||||||
|
|
||||||
|
if(NOT AZMQ_ROOT)
|
||||||
|
set(AZMQ_ROOT $ENV{AZMQ_ROOT})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(AZMQ_INCLUDE_DIR
|
||||||
|
NAMES azmq/socket.hpp
|
||||||
|
HINTS ${AZMQ_ROOT} $ENV{AZMQ_ROOT}
|
||||||
|
PATH_SUFFIXES include
|
||||||
|
DOC "AZMQ include directory"
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(AZMQ
|
||||||
|
REQUIRED_VARS AZMQ_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(AZMQ_FOUND AND NOT TARGET AZMQ::AZMQ)
|
||||||
|
add_library(AZMQ::AZMQ INTERFACE IMPORTED)
|
||||||
|
set_target_properties(AZMQ::AZMQ PROPERTIES
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES ${AZMQ_INCLUDE_DIR}
|
||||||
|
INTERFACE_LINK_LIBRARIES "libzmq;Boost::boost;Boost::container;Boost::system"
|
||||||
|
)
|
||||||
|
endif()
|
|
@ -222,6 +222,7 @@ if(BUILD_OFI_TRANSPORT)
|
||||||
set(OFI_DEPS
|
set(OFI_DEPS
|
||||||
asiofi::asiofi
|
asiofi::asiofi
|
||||||
Boost::container
|
Boost::container
|
||||||
|
AZMQ::AZMQ
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
set(optional_deps ${NANOMSG_DEPS} ${OFI_DEPS})
|
set(optional_deps ${NANOMSG_DEPS} ${OFI_DEPS})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user