-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2024-present The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or https://opensource.org/license/mit/. | ||
|
||
#[=======================================================================[ | ||
FindZeroMQ | ||
---------- | ||
|
||
Finds the ZeroMQ headers and library. | ||
|
||
This is a wrapper around find_package()/pkg_check_modules() commands that: | ||
- facilitates searching in various build environments | ||
- prints a standard log message | ||
|
||
#]=======================================================================] | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package(ZeroMQ ${ZeroMQ_FIND_VERSION} NO_MODULE QUIET) | ||
if(ZeroMQ_FOUND) | ||
find_package_handle_standard_args(ZeroMQ | ||
REQUIRED_VARS ZeroMQ_DIR | ||
VERSION_VAR ZeroMQ_VERSION | ||
) | ||
if(TARGET libzmq) | ||
add_library(zeromq ALIAS libzmq) | ||
elseif(TARGET libzmq-static) | ||
add_library(zeromq ALIAS libzmq-static) | ||
endif() | ||
mark_as_advanced(ZeroMQ_DIR) | ||
else() | ||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(libzmq QUIET | ||
IMPORTED_TARGET | ||
libzmq>=${ZeroMQ_FIND_VERSION} | ||
) | ||
find_package_handle_standard_args(ZeroMQ | ||
REQUIRED_VARS libzmq_LIBRARY_DIRS | ||
VERSION_VAR libzmq_VERSION | ||
) | ||
add_library(zeromq ALIAS PkgConfig::libzmq) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters