cppzmq/cppzmqConfig.cmake.in
Axel Huebl 2008da35e6
Pkg-Config Fallback: File
move the new logic to a simple file so we
do not add code duplication
2017-07-18 20:15:41 +02:00

38 lines
1.0 KiB
CMake

# cppzmq cmake module
#
# The following import targets are created
#
# ::
#
# cppzmq-static
# cppzmq
#
# This module sets the following variables in your project::
#
# cppzmq_FOUND - true if cppzmq found on the system
# cppzmq_INCLUDE_DIR - the directory containing cppzmq headers
# cppzmq_LIBRARY - the ZeroMQ library for dynamic linking
# cppzmq_STATIC_LIBRARY - the ZeroMQ library for static linking
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_package(ZeroMQ)
# libzmq autotools install: fallback to pkg-config
if(NOT ZeroMQ_FOUND)
include(${CMAKE_CURRENT_LIST_DIR}/libzmqPkgConfigFallback.cmake)
endif()
if(NOT ZeroMQ_FOUND)
message(FATAL_ERROR "ZeroMQ was NOT found!")
endif()
if(NOT TARGET @PROJECT_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
get_target_property(@PROJECT_NAME@_INCLUDE_DIR cppzmq INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_LIBRARY libzmq LOCATION)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY libzmq-static LOCATION)
endif()