| 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_restricted_methods.cpp |
| 53 |
zmq_pub.cpp |
| 54 |
zmq_server.cpp) |
| 55 |
|
| 56 |
|
| 57 |
set(rpc_base_headers |
| 58 |
rpc_args.h |
| 59 |
rpc_payment_signature.h |
| 60 |
rpc_handler.h) |
| 61 |
|
| 62 |
set(rpc_headers |
| 63 |
rpc_version_str.h |
| 64 |
rpc_handler.h) |
| 65 |
|
| 66 |
set(rpc_pub_headers zmq_pub.h) |
| 67 |
|
| 68 |
set(daemon_rpc_server_headers) |
| 69 |
|
| 70 |
set(rpc_private_headers |
| 71 |
bootstrap_daemon.h |
| 72 |
core_rpc_server.h |
| 73 |
rpc_payment.h |
| 74 |
core_rpc_server_commands_defs.h |
| 75 |
core_rpc_server_error_codes.h) |
| 76 |
|
| 77 |
set(daemon_messages_private_headers |
| 78 |
message.h |
| 79 |
daemon_messages.h) |
| 80 |
|
| 81 |
set(daemon_rpc_server_private_headers |
| 82 |
message.h |
| 83 |
daemon_messages.h |
| 84 |
daemon_handler.h |
| 85 |
zmq_restricted_methods.h |
| 86 |
zmq_server.h) |
| 87 |
|
| 88 |
|
| 89 |
monero_private_headers(rpc |
| 90 |
${rpc_private_headers}) |
| 91 |
|
| 92 |
set(rpc_pub_private_headers) |
| 93 |
|
| 94 |
monero_private_headers(daemon_rpc_server |
| 95 |
${daemon_rpc_server_private_headers}) |
| 96 |
|
| 97 |
|
| 98 |
monero_add_library(rpc_base |
| 99 |
${rpc_base_sources} |
| 100 |
${rpc_base_headers} |
| 101 |
${rpc_base_private_headers}) |
| 102 |
|
| 103 |
monero_add_library(rpc |
| 104 |
${rpc_sources} |
| 105 |
${rpc_headers} |
| 106 |
${rpc_private_headers}) |
| 107 |
|
| 108 |
monero_add_library(rpc_pub |
| 109 |
${rpc_pub_sources} |
| 110 |
${rpc_pub_headers} |
| 111 |
${rpc_pub_private_headers}) |
| 112 |
|
| 113 |
monero_add_library(daemon_messages |
| 114 |
${daemon_messages_sources} |
| 115 |
${daemon_messages_headers} |
| 116 |
${daemon_messages_private_headers}) |
| 117 |
|
| 118 |
monero_add_library(daemon_rpc_server |
| 119 |
${daemon_rpc_server_sources} |
| 120 |
${daemon_rpc_server_headers} |
| 121 |
${daemon_rpc_server_private_headers}) |
| 122 |
|
| 123 |
|
| 124 |
target_link_libraries(rpc_base |
| 125 |
PUBLIC |
| 126 |
common |
| 127 |
epee |
| 128 |
${Boost_REGEX_LIBRARY} |
| 129 |
${Boost_THREAD_LIBRARY} |
| 130 |
${Boost_PROGRAM_OPTIONS_LIBRARY} |
| 131 |
PRIVATE |
| 132 |
${EXTRA_LIBRARIES}) |
| 133 |
|
| 134 |
target_link_libraries(rpc |
| 135 |
PUBLIC |
| 136 |
rpc_base |
| 137 |
common |
| 138 |
cryptonote_core |
| 139 |
cryptonote_protocol |
| 140 |
net |
| 141 |
version |
| 142 |
${Boost_REGEX_LIBRARY} |
| 143 |
${Boost_THREAD_LIBRARY} |
| 144 |
PRIVATE |
| 145 |
${EXTRA_LIBRARIES}) |
| 146 |
|
| 147 |
target_link_libraries(rpc_pub |
| 148 |
PUBLIC |
| 149 |
epee |
| 150 |
net |
| 151 |
cryptonote_basic |
| 152 |
serialization |
| 153 |
${Boost_THREAD_LIBRARY}) |
| 154 |
|
| 155 |
target_link_libraries(daemon_messages |
| 156 |
LINK_PRIVATE |
| 157 |
cryptonote_core |
| 158 |
cryptonote_protocol |
| 159 |
version |
| 160 |
serialization |
| 161 |
${EXTRA_LIBRARIES}) |
| 162 |
|
| 163 |
target_link_libraries(daemon_rpc_server |
| 164 |
LINK_PRIVATE |
| 165 |
rpc |
| 166 |
rpc_pub |
| 167 |
cryptonote_core |
| 168 |
cryptonote_protocol |
| 169 |
version |
| 170 |
daemon_messages |
| 171 |
serialization |
| 172 |
${Boost_CHRONO_LIBRARY} |
| 173 |
${Boost_REGEX_LIBRARY} |
| 174 |
${Boost_SYSTEM_LIBRARY} |
| 175 |
${Boost_THREAD_LIBRARY} |
| 176 |
${ZMQ_LIB} |
| 177 |
${EXTRA_LIBRARIES}) |
| 178 |
target_include_directories(daemon_rpc_server PUBLIC ${ZMQ_INCLUDE_PATH}) |
| 179 |
target_include_directories(obj_daemon_rpc_server PUBLIC ${ZMQ_INCLUDE_PATH}) |