dncurrency/nano/node/CMakeLists.txt
Piotr Wójcik a1cc7a5a8c
Fix linker warnings about duplicate libs (#4299)
Fix linker warnings about duplicate libs
2023-09-27 19:28:43 +01:00

240 lines
5.8 KiB
CMake

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# No opencl
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(platform_sources plat/windows/openclapi.cpp)
set(psapi_lib Psapi)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(platform_sources plat/posix/openclapi.cpp)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(platform_sources plat/posix/openclapi.cpp)
else()
error("Unknown platform: ${CMAKE_SYSTEM_NAME}")
endif()
add_library(
node
${platform_sources}
active_transactions.hpp
active_transactions.cpp
backlog_population.hpp
backlog_population.cpp
bandwidth_limiter.hpp
bandwidth_limiter.cpp
block_arrival.hpp
block_arrival.cpp
block_broadcast.cpp
block_broadcast.hpp
block_publisher.cpp
block_publisher.hpp
gap_tracker.cpp
gap_tracker.hpp
blocking_observer.cpp
blocking_observer.hpp
blockprocessor.hpp
blockprocessor.cpp
bootstrap/block_deserializer.hpp
bootstrap/block_deserializer.cpp
bootstrap/bootstrap_attempt.hpp
bootstrap/bootstrap_attempt.cpp
bootstrap/bootstrap_bulk_pull.hpp
bootstrap/bootstrap_bulk_pull.cpp
bootstrap/bootstrap_bulk_push.hpp
bootstrap/bootstrap_bulk_push.cpp
bootstrap/bootstrap_config.hpp
bootstrap/bootstrap_config.cpp
bootstrap/bootstrap_connections.hpp
bootstrap/bootstrap_connections.cpp
bootstrap/bootstrap_frontier.hpp
bootstrap/bootstrap_frontier.cpp
bootstrap/bootstrap_lazy.hpp
bootstrap/bootstrap_lazy.cpp
bootstrap/bootstrap_legacy.hpp
bootstrap/bootstrap_legacy.cpp
bootstrap/bootstrap.hpp
bootstrap/bootstrap.cpp
bootstrap/bootstrap_server.hpp
bootstrap/bootstrap_server.cpp
bootstrap_ascending/common.hpp
bootstrap_ascending/throttle.hpp
bootstrap_ascending/throttle.cpp
bootstrap_ascending/account_sets.hpp
bootstrap_ascending/account_sets.cpp
bootstrap_ascending/iterators.hpp
bootstrap_ascending/iterators.cpp
bootstrap_ascending/peer_scoring.hpp
bootstrap_ascending/peer_scoring.cpp
bootstrap_ascending/service.hpp
bootstrap_ascending/service.cpp
cli.hpp
cli.cpp
common.hpp
common.cpp
confirmation_height_bounded.hpp
confirmation_height_bounded.cpp
confirmation_height_processor.hpp
confirmation_height_processor.cpp
confirmation_height_unbounded.hpp
confirmation_height_unbounded.cpp
confirmation_solicitor.hpp
confirmation_solicitor.cpp
daemonconfig.hpp
daemonconfig.cpp
distributed_work.hpp
distributed_work.cpp
distributed_work_factory.hpp
distributed_work_factory.cpp
election.hpp
election.cpp
election_insertion_result.hpp
epoch_upgrader.hpp
epoch_upgrader.cpp
gap_cache.hpp
gap_cache.cpp
inactive_cache_information.hpp
inactive_cache_information.cpp
inactive_cache_status.hpp
inactive_cache_status.cpp
ipc/action_handler.hpp
ipc/action_handler.cpp
ipc/flatbuffers_handler.hpp
ipc/flatbuffers_handler.cpp
ipc/flatbuffers_util.hpp
ipc/flatbuffers_util.cpp
ipc/ipc_access_config.hpp
ipc/ipc_access_config.cpp
ipc/ipc_broker.hpp
ipc/ipc_broker.cpp
ipc/ipc_config.hpp
ipc/ipc_config.cpp
ipc/ipc_server.hpp
ipc/ipc_server.cpp
json_handler.hpp
json_handler.cpp
ledger_walker.hpp
ledger_walker.cpp
logging.hpp
logging.cpp
make_store.hpp
make_store.cpp
network.hpp
network.cpp
nodeconfig.hpp
nodeconfig.cpp
node_observers.hpp
node_observers.cpp
node_rpc_config.hpp
node_rpc_config.cpp
node.hpp
node.cpp
online_reps.hpp
online_reps.cpp
openclconfig.hpp
openclconfig.cpp
openclwork.hpp
openclwork.cpp
peer_exclusion.hpp
peer_exclusion.cpp
portmapping.hpp
portmapping.cpp
process_live_dispatcher.cpp
process_live_dispatcher.hpp
repcrawler.hpp
repcrawler.cpp
request_aggregator.hpp
request_aggregator.cpp
scheduler/bucket.cpp
scheduler/bucket.hpp
scheduler/buckets.cpp
scheduler/buckets.hpp
scheduler/component.hpp
scheduler/component.cpp
scheduler/hinted.hpp
scheduler/hinted.cpp
scheduler/manual.hpp
scheduler/manual.cpp
scheduler/optimistic.hpp
scheduler/optimistic.cpp
scheduler/priority.hpp
scheduler/priority.cpp
signatures.hpp
signatures.cpp
state_block_signature_verification.hpp
state_block_signature_verification.cpp
telemetry.hpp
telemetry.cpp
transport/channel.hpp
transport/channel.cpp
transport/fake.hpp
transport/fake.cpp
transport/inproc.hpp
transport/inproc.cpp
transport/message_deserializer.hpp
transport/message_deserializer.cpp
transport/socket.hpp
transport/socket.cpp
transport/tcp.hpp
transport/tcp.cpp
transport/tcp_server.hpp
transport/tcp_server.cpp
transport/transport.hpp
transport/transport.cpp
unchecked_map.cpp
unchecked_map.hpp
vote_cache.hpp
vote_cache.cpp
vote_processor.hpp
vote_processor.cpp
voting.hpp
voting.cpp
wallet.hpp
wallet.cpp
websocket.hpp
websocket.cpp
websocketconfig.hpp
websocketconfig.cpp
websocket_stream.hpp
websocket_stream.cpp
write_database_queue.hpp
write_database_queue.cpp
messages.hpp
messages.cpp
xorshift.hpp)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(DISKHASH diskhash)
endif()
target_link_libraries(
node
nano_lib
nano_store
secure
rpc
libminiupnpc-static
argon2
lmdb
Boost::beast
Boost::filesystem
Boost::log_setup
Boost::log
Boost::program_options
Boost::stacktrace
Boost::system
Boost::thread
rocksdb
${DISKHASH}
${CMAKE_DL_LIBS}
${psapi_lib})
target_compile_definitions(
node PRIVATE -DTAG_VERSION_STRING=${TAG_VERSION_STRING}
-DGIT_COMMIT_HASH=${GIT_COMMIT_HASH})
# This ensures that any changes to Flatbuffers source files will cause a
# regeneration of any C++ header files.
add_dependencies(node ipc_flatbuffers_lib)
include_directories(${CMAKE_SOURCE_DIR}/submodules)
include_directories(${CMAKE_SOURCE_DIR}/submodules/cpptoml/include)
include_directories(
${CMAKE_SOURCE_DIR}/submodules/nano-pow-server/deps/cpptoml/include)