2018-02-14 14:26:28 +01:00
|
|
|
# This file is part of the Flowee project
|
2023-03-20 19:46:37 +01:00
|
|
|
# Copyright (C) 2018-2023 Tom Zander <tom@flowee.org>
|
2018-02-14 14:26:28 +01:00
|
|
|
#
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
2018-02-10 14:59:45 +01:00
|
|
|
project (hub)
|
|
|
|
|
|
2022-12-09 23:38:19 +01:00
|
|
|
add_subdirectory(3rdparty)
|
2022-02-22 18:27:48 +01:00
|
|
|
add_subdirectory(server)
|
|
|
|
|
add_subdirectory(api)
|
|
|
|
|
|
2019-06-02 20:20:04 +02:00
|
|
|
include_directories(${LIBAPI_INCLUDES} ${LIBCONSOLE_INCLUDES} ${CMAKE_BINARY_DIR}/include)
|
2018-02-10 14:59:45 +01:00
|
|
|
|
2022-02-22 18:10:14 +01:00
|
|
|
set (HUB_SOURCES bitcoind.cpp)
|
|
|
|
|
if (WIN32)
|
|
|
|
|
list (APPEND HUB_SOURCES bitcoind-res.rc)
|
|
|
|
|
endif ()
|
2018-02-10 14:59:45 +01:00
|
|
|
|
2023-03-20 19:46:37 +01:00
|
|
|
if (${Event_FOUND})
|
2023-05-02 22:22:51 +02:00
|
|
|
set_property (GLOBAL PROPERTY BUILDING_HUB TRUE) # to let other dirs know we are being built
|
2023-03-20 19:46:37 +01:00
|
|
|
add_executable(hub ${HUB_SOURCES})
|
|
|
|
|
target_link_libraries(hub
|
|
|
|
|
hub_api
|
|
|
|
|
hub_server
|
|
|
|
|
flowee_networkmanager
|
|
|
|
|
flowee_utils
|
|
|
|
|
${OPENSSL_LIBRARIES}
|
|
|
|
|
${ZMQ_LIBRARIES}
|
|
|
|
|
${Event_LIBRARIES}
|
|
|
|
|
${BERKELEY_DB_LIBRARIES}
|
|
|
|
|
${MINIUPNP_LIBRARY}
|
|
|
|
|
${BOOST_THREAD_LIBRARY}
|
|
|
|
|
)
|
2022-02-22 18:10:14 +01:00
|
|
|
|
2023-03-20 19:46:37 +01:00
|
|
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/hub DESTINATION bin)
|
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/support/flowee.conf
|
|
|
|
|
CONFIGURATIONS Release RelWithDebInfo
|
|
|
|
|
DESTINATION etc/flowee)
|
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/support/thehub.service
|
|
|
|
|
CONFIGURATIONS Release RelWithDebInfo
|
|
|
|
|
DESTINATION systemd/system/)
|
2022-02-22 18:10:14 +01:00
|
|
|
|
2023-03-20 19:46:37 +01:00
|
|
|
set (CLI_SOURCES bitcoin-cli.cpp)
|
|
|
|
|
if (WIN32)
|
|
|
|
|
list (APPEND CLI_SOURCES bitcoin-cli-res.rc)
|
|
|
|
|
endif ()
|
|
|
|
|
add_executable(hub-cli ${CLI_SOURCES})
|
|
|
|
|
target_link_libraries(hub-cli
|
|
|
|
|
hub_server
|
|
|
|
|
flowee_utils
|
|
|
|
|
flowee_crypto
|
2022-02-22 18:10:14 +01:00
|
|
|
|
2023-03-20 19:46:37 +01:00
|
|
|
${UNIVALUE_LIBRARY}
|
|
|
|
|
${OPENSSL_LIBRARIES}
|
|
|
|
|
${Event_LIBRARIES}
|
|
|
|
|
${BOOST_THREAD_LIBRARY}
|
|
|
|
|
)
|
2022-02-22 18:27:48 +01:00
|
|
|
|
2023-03-20 19:46:37 +01:00
|
|
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/hub-cli DESTINATION bin)
|
|
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
message("WARN: missing lib event => Skipping compile of Hub / Hub-cll")
|
|
|
|
|
endif()
|