| 1 |
# Copyright (c) 2014-2022, The Monero Project |
| 2 |
# |
| 3 |
# All rights reserved. |
| 4 |
# |
| 5 |
# Redistribution and use in source and binary forms, with or without modification, are |
| 6 |
# permitted provided that the following conditions are met: |
| 7 |
# |
| 8 |
# 1. Redistributions of source code must retain the above copyright notice, this list of |
| 9 |
# conditions and the following disclaimer. |
| 10 |
# |
| 11 |
# 2. Redistributions in binary form must reproduce the above copyright notice, this list |
| 12 |
# of conditions and the following disclaimer in the documentation and/or other |
| 13 |
# materials provided with the distribution. |
| 14 |
# |
| 15 |
# 3. Neither the name of the copyright holder nor the names of its contributors may be |
| 16 |
# used to endorse or promote products derived from this software without specific |
| 17 |
# prior written permission. |
| 18 |
# |
| 19 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY |
| 20 |
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 21 |
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
| 22 |
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 24 |
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 25 |
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 26 |
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
| 27 |
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 |
|
| 29 |
include_directories(SYSTEM ${ZMQ_INCLUDE_PATH}) |
| 30 |
|
| 31 |
set(rpc_base_sources |
| 32 |
rpc_args.cpp |
| 33 |
rpc_payment_signature.cpp |
| 34 |
rpc_handler.cpp) |
| 35 |
|
| 36 |
set(rpc_sources |
| 37 |
bootstrap_daemon.cpp |
| 38 |
bootstrap_node_selector.cpp |
| 39 |
core_rpc_server.cpp |
| 40 |
rpc_payment.cpp |
| 41 |
rpc_version_str.cpp |
| 42 |
instanciations.cpp) |
| 43 |
|
| 44 |
set(daemon_messages_sources |
| 45 |
message.cpp |
| 46 |
daemon_messages.cpp) |
| 47 |
|
| 48 |
set(rpc_pub_sources zmq_pub.cpp) |
| 49 |
|
| 50 |
set(daemon_rpc_server_sources |
| 51 |
daemon_handler.cpp |
| 52 |
zmq_pub.cpp |
| 53 |
zmq_server.cpp) |
| 54 |
|
| 55 |
|
| 56 |
set(rpc_base_headers |
| 57 |
rpc_args.h |
| 58 |
rpc_payment_signature.h |
| 59 |
rpc_handler.h) |
| 60 |
|
| 61 |
set(rpc_headers |
| 62 |
rpc_version_str.h |
| 63 |
rpc_handler.h) |
| 64 |
|
| 65 |
set(rpc_pub_headers zmq_pub.h) |
| 66 |
|
| 67 |
set(daemon_rpc_server_headers) |
| 68 |
|
| 69 |
set(rpc_private_headers |
| 70 |
bootstrap_daemon.h |
| 71 |
core_rpc_server.h |
| 72 |
rpc_payment.h |
| 73 |
core_rpc_server_commands_defs.h |
| 74 |
core_rpc_server_error_codes.h) |
| 75 |
|
| 76 |
set(daemon_messages_private_headers |
| 77 |
message.h |
| 78 |
daemon_messages.h) |
| 79 |
|
| 80 |
set(daemon_rpc_server_private_headers |
| 81 |
message.h |
| 82 |
daemon_messages.h |
| 83 |
daemon_handler.h |
| 84 |
zmq_server.h) |
| 85 |
|
| 86 |
|
| 87 |
monero_private_headers(rpc |
| 88 |
${rpc_private_headers}) |
| 89 |
|
| 90 |
set(rpc_pub_private_headers) |
| 91 |
|
| 92 |
monero_private_headers(daemon_rpc_server |
| 93 |
${daemon_rpc_server_private_headers}) |
| 94 |
|
| 95 |
|
| 96 |
monero_add_library(rpc_base |
| 97 |
${rpc_base_sources} |
| 98 |
${rpc_base_headers} |
| 99 |
${rpc_base_private_headers}) |
| 100 |
|
| 101 |
|
| 102 |
target_link_libraries(rpc_base |
| 103 |
PUBLIC |
| 104 |
common |
| 105 |
epee |
| 106 |
${Boost_REGEX_LIBRARY} |
| 107 |
${Boost_THREAD_LIBRARY} |
| 108 |
${Boost_PROGRAM_OPTIONS_LIBRARY} |
| 109 |
PRIVATE |
| 110 |
${EXTRA_LIBRARIES}) |