cmake-rewrite
This commit is contained in:
parent
66c2b5d8ad
commit
f12adde5bf
|
@ -1,19 +1,15 @@
|
|||
[submodule "external/miniupnp"]
|
||||
path = external/miniupnp
|
||||
url = https://github.com/miniupnp/miniupnp
|
||||
[submodule "external/rapidjson"]
|
||||
path = external/rapidjson
|
||||
url = https://github.com/Tencent/rapidjson
|
||||
[submodule "external/trezor-common"]
|
||||
active = false
|
||||
path = external/trezor-common
|
||||
url = https://github.com/trezor/trezor-common.git
|
||||
[submodule "external/supercop"]
|
||||
path = external/supercop
|
||||
url = https://github.com/monero-project/supercop
|
||||
branch = monero
|
||||
url = https://git.wownero.com/dsc/supercop.git
|
||||
branch = cmake-rewrite
|
||||
[submodule "external/randomwow"]
|
||||
path = external/randomwow
|
||||
url = https://git.wownero.com/wownero/RandomWOW
|
||||
branch = 1.2.1-wow
|
||||
|
||||
url = https://git.wownero.com/dsc/randomwow.git
|
||||
branch = cmake-rewrite
|
||||
|
|
1243
CMakeLists.txt
1243
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
|
@ -6,7 +6,7 @@ macro(CHECK_LINKER_FLAG flag VARIABLE)
|
|||
message(STATUS "Looking for ${flag} linker flag")
|
||||
endif()
|
||||
|
||||
set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
|
||||
set(_cle_source ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
|
||||
|
||||
set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
|
||||
set(CMAKE_C_FLAGS "${flag}")
|
||||
|
|
|
@ -0,0 +1,291 @@
|
|||
# Written in 2016 by Henrik Steffen Gaßmann <henrik@gassmann.onl>
|
||||
#
|
||||
# To the extent possible under law, the author(s) have dedicated all copyright
|
||||
# and related and neighboring rights to this software to the public domain
|
||||
# worldwide. This software is distributed without any warranty.
|
||||
#
|
||||
# You should have received a copy of the CC0 Public Domain Dedication along with
|
||||
# this software. If not, see
|
||||
#
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
#
|
||||
# ##############################################################################
|
||||
# Tries to find the local libsodium installation.
|
||||
#
|
||||
# On Windows the sodium_DIR environment variable is used as a default hint which
|
||||
# can be overridden by setting the corresponding cmake variable.
|
||||
#
|
||||
# Once done the following variables will be defined:
|
||||
#
|
||||
# sodium_FOUND sodium_INCLUDE_DIR sodium_LIBRARY_DEBUG sodium_LIBRARY_RELEASE
|
||||
# sodium_VERSION_STRING
|
||||
#
|
||||
# Furthermore an imported "sodium" target is created.
|
||||
#
|
||||
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(_GCC_COMPATIBLE 1)
|
||||
endif()
|
||||
|
||||
# static library option
|
||||
if(NOT DEFINED sodium_USE_STATIC_LIBS)
|
||||
option(sodium_USE_STATIC_LIBS "enable to statically link against sodium" OFF)
|
||||
endif()
|
||||
if(NOT (sodium_USE_STATIC_LIBS EQUAL sodium_USE_STATIC_LIBS_LAST))
|
||||
unset(sodium_LIBRARY CACHE)
|
||||
unset(sodium_LIBRARY_DEBUG CACHE)
|
||||
unset(sodium_LIBRARY_RELEASE CACHE)
|
||||
unset(sodium_DLL_DEBUG CACHE)
|
||||
unset(sodium_DLL_RELEASE CACHE)
|
||||
set(sodium_USE_STATIC_LIBS_LAST
|
||||
${sodium_USE_STATIC_LIBS}
|
||||
CACHE INTERNAL "internal change tracking variable")
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
# UNIX
|
||||
if(UNIX)
|
||||
# import pkg-config
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(sodium_PKG QUIET libsodium)
|
||||
endif()
|
||||
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
if(sodium_PKG_STATIC_LIBRARIES)
|
||||
foreach(_libname ${sodium_PKG_STATIC_LIBRARIES})
|
||||
if(NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending
|
||||
# with .a
|
||||
list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a")
|
||||
endif()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES)
|
||||
else()
|
||||
# if pkgconfig for libsodium doesn't provide static lib info, then
|
||||
# override PKG_STATIC here..
|
||||
set(sodium_PKG_STATIC_LIBRARIES libsodium.a)
|
||||
endif()
|
||||
|
||||
set(XPREFIX sodium_PKG_STATIC)
|
||||
else()
|
||||
if(sodium_PKG_LIBRARIES STREQUAL "")
|
||||
set(sodium_PKG_LIBRARIES sodium)
|
||||
endif()
|
||||
|
||||
set(XPREFIX sodium_PKG)
|
||||
endif()
|
||||
|
||||
find_path(sodium_INCLUDE_DIR sodium.h HINTS ${${XPREFIX}_INCLUDE_DIRS})
|
||||
find_library(sodium_LIBRARY_DEBUG
|
||||
NAMES ${${XPREFIX}_LIBRARIES}
|
||||
HINTS ${${XPREFIX}_LIBRARY_DIRS})
|
||||
find_library(sodium_LIBRARY_RELEASE
|
||||
NAMES ${${XPREFIX}_LIBRARIES}
|
||||
HINTS ${${XPREFIX}_LIBRARY_DIRS})
|
||||
|
||||
# ############################################################################
|
||||
# Windows
|
||||
elseif(WIN32)
|
||||
set(sodium_DIR "$ENV{sodium_DIR}" CACHE FILEPATH "sodium install directory")
|
||||
mark_as_advanced(sodium_DIR)
|
||||
|
||||
find_path(sodium_INCLUDE_DIR sodium.h
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES include)
|
||||
|
||||
if(MSVC)
|
||||
# detect target architecture
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.c" [=[
|
||||
#if defined _M_IX86
|
||||
#error ARCH_VALUE x86_32
|
||||
#elif defined _M_X64
|
||||
#error ARCH_VALUE x86_64
|
||||
#endif
|
||||
#error ARCH_VALUE unknown
|
||||
]=])
|
||||
try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/arch.c"
|
||||
OUTPUT_VARIABLE _COMPILATION_LOG)
|
||||
string(REGEX
|
||||
REPLACE ".*ARCH_VALUE ([a-zA-Z0-9_]+).*"
|
||||
"\\1"
|
||||
_TARGET_ARCH
|
||||
"${_COMPILATION_LOG}")
|
||||
|
||||
# construct library path
|
||||
if(_TARGET_ARCH STREQUAL "x86_32")
|
||||
string(APPEND _PLATFORM_PATH "Win32")
|
||||
elseif(_TARGET_ARCH STREQUAL "x86_64")
|
||||
string(APPEND _PLATFORM_PATH "x64")
|
||||
else()
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"the ${_TARGET_ARCH} architecture is not supported by Findsodium.cmake."
|
||||
)
|
||||
endif()
|
||||
string(APPEND _PLATFORM_PATH "/$$CONFIG$$")
|
||||
|
||||
if(MSVC_VERSION LESS 1900)
|
||||
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60")
|
||||
else()
|
||||
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
|
||||
endif()
|
||||
string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}")
|
||||
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
string(APPEND _PLATFORM_PATH "/static")
|
||||
else()
|
||||
string(APPEND _PLATFORM_PATH "/dynamic")
|
||||
endif()
|
||||
|
||||
string(REPLACE "$$CONFIG$$"
|
||||
"Debug"
|
||||
_DEBUG_PATH_SUFFIX
|
||||
"${_PLATFORM_PATH}")
|
||||
string(REPLACE "$$CONFIG$$"
|
||||
"Release"
|
||||
_RELEASE_PATH_SUFFIX
|
||||
"${_PLATFORM_PATH}")
|
||||
|
||||
find_library(sodium_LIBRARY_DEBUG libsodium.lib
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX})
|
||||
find_library(sodium_LIBRARY_RELEASE libsodium.lib
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX})
|
||||
if(NOT sodium_USE_STATIC_LIBS)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
|
||||
find_library(sodium_DLL_DEBUG libsodium
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX})
|
||||
find_library(sodium_DLL_RELEASE libsodium
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
|
||||
endif()
|
||||
|
||||
elseif(_GCC_COMPATIBLE)
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
find_library(sodium_LIBRARY_DEBUG libsodium.a
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES lib)
|
||||
find_library(sodium_LIBRARY_RELEASE libsodium.a
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES lib)
|
||||
else()
|
||||
find_library(sodium_LIBRARY_DEBUG libsodium.dll.a
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES lib)
|
||||
find_library(sodium_LIBRARY_RELEASE libsodium.dll.a
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES lib)
|
||||
|
||||
file(GLOB _DLL
|
||||
LIST_DIRECTORIES false
|
||||
RELATIVE "${sodium_DIR}/bin"
|
||||
"${sodium_DIR}/bin/libsodium*.dll")
|
||||
find_library(sodium_DLL_DEBUG ${_DLL} libsodium
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES bin)
|
||||
find_library(sodium_DLL_RELEASE ${_DLL} libsodium
|
||||
HINTS ${sodium_DIR}
|
||||
PATH_SUFFIXES bin)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
|
||||
endif()
|
||||
|
||||
# ############################################################################
|
||||
# unsupported
|
||||
else()
|
||||
message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
# common stuff
|
||||
|
||||
# extract sodium version
|
||||
if(sodium_INCLUDE_DIR)
|
||||
set(_VERSION_HEADER "${sodium_INCLUDE_DIR}/sodium/version.h")
|
||||
if(EXISTS "${_VERSION_HEADER}")
|
||||
file(READ "${_VERSION_HEADER}" _VERSION_HEADER_CONTENT)
|
||||
string(REGEX
|
||||
REPLACE ".*define[ \t]+SODIUM_VERSION_STRING[^\"]+\"([^\"]+)\".*"
|
||||
"\\1"
|
||||
sodium_VERSION_STRING
|
||||
"${_VERSION_HEADER_CONTENT}")
|
||||
set(sodium_VERSION_STRING "${sodium_VERSION_STRING}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# communicate results
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(sodium
|
||||
REQUIRED_VARS
|
||||
sodium_LIBRARY_RELEASE
|
||||
sodium_LIBRARY_DEBUG
|
||||
sodium_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
sodium_VERSION_STRING)
|
||||
|
||||
# mark file paths as advanced
|
||||
mark_as_advanced(sodium_INCLUDE_DIR)
|
||||
mark_as_advanced(sodium_LIBRARY_DEBUG)
|
||||
mark_as_advanced(sodium_LIBRARY_RELEASE)
|
||||
if(WIN32)
|
||||
mark_as_advanced(sodium_DLL_DEBUG)
|
||||
mark_as_advanced(sodium_DLL_RELEASE)
|
||||
endif()
|
||||
|
||||
# create imported target
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
set(_LIB_TYPE STATIC)
|
||||
else()
|
||||
set(_LIB_TYPE SHARED)
|
||||
endif()
|
||||
add_library(sodium ${_LIB_TYPE} IMPORTED)
|
||||
|
||||
set_target_properties(sodium
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${sodium_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES
|
||||
"C")
|
||||
|
||||
if(sodium_USE_STATIC_LIBS)
|
||||
set_target_properties(sodium
|
||||
PROPERTIES INTERFACE_COMPILE_DEFINITIONS
|
||||
"SODIUM_STATIC"
|
||||
IMPORTED_LOCATION
|
||||
"${sodium_LIBRARY_RELEASE}"
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
"${sodium_LIBRARY_DEBUG}")
|
||||
else()
|
||||
if(UNIX)
|
||||
set_target_properties(sodium
|
||||
PROPERTIES IMPORTED_LOCATION
|
||||
"${sodium_LIBRARY_RELEASE}"
|
||||
IMPORTED_LOCATION_DEBUG
|
||||
"${sodium_LIBRARY_DEBUG}")
|
||||
elseif(WIN32)
|
||||
set_target_properties(sodium
|
||||
PROPERTIES IMPORTED_IMPLIB
|
||||
"${sodium_LIBRARY_RELEASE}"
|
||||
IMPORTED_IMPLIB_DEBUG
|
||||
"${sodium_LIBRARY_DEBUG}")
|
||||
if(NOT (sodium_DLL_DEBUG MATCHES ".*-NOTFOUND"))
|
||||
set_target_properties(sodium
|
||||
PROPERTIES IMPORTED_LOCATION_DEBUG
|
||||
"${sodium_DLL_DEBUG}")
|
||||
endif()
|
||||
if(NOT (sodium_DLL_RELEASE MATCHES ".*-NOTFOUND"))
|
||||
set_target_properties(sodium
|
||||
PROPERTIES IMPORTED_LOCATION_RELWITHDEBINFO
|
||||
"${sodium_DLL_RELEASE}"
|
||||
IMPORTED_LOCATION_MINSIZEREL
|
||||
"${sodium_DLL_RELEASE}"
|
||||
IMPORTED_LOCATION_RELEASE
|
||||
"${sodium_DLL_RELEASE}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
|
@ -1,40 +1,104 @@
|
|||
# Copyright (c) 2014-2022, The Monero Project
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
# conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
# of conditions and the following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without specific
|
||||
# prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#[=======================================================================[.rst:
|
||||
FindLibunbound
|
||||
--------------
|
||||
|
||||
MESSAGE(STATUS "Looking for libunbound")
|
||||
Find the Libunbound library
|
||||
|
||||
FIND_PATH(UNBOUND_INCLUDE_DIR
|
||||
NAMES unbound.h
|
||||
PATH_SUFFIXES include/ include/unbound/
|
||||
PATHS "${PROJECT_SOURCE_DIR}"
|
||||
${UNBOUND_ROOT}
|
||||
$ENV{UNBOUND_ROOT}
|
||||
/usr/local/
|
||||
/usr/
|
||||
)
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
find_library(UNBOUND_LIBRARIES unbound)
|
||||
This module defines the following :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``Libunbound::Libunbound``
|
||||
The Libunbound library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``Libunbound_FOUND``
|
||||
If false, do not try to use Libunbound.
|
||||
``LIBUNBOUND_INCLUDE_DIR``
|
||||
where to find libunbound headers.
|
||||
``LIBUNBOUND_LIBRARIES``
|
||||
the libraries needed to use Libunbound.
|
||||
``LIBUNBOUND_VERSION``
|
||||
the version of the Libunbound library found
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PkgLibunbound IMPORTED_TARGET GLOBAL QUIET libunbound)
|
||||
endif ()
|
||||
|
||||
if (PkgLibunbound_FOUND)
|
||||
set(LIBUNBOUND_INCLUDE_DIR ${PkgLibunbound_INCLUDE_DIRS} CACHE FILEPATH "libunbound include path")
|
||||
set(LIBUNBOUND_LIBRARIES ${PkgLibunbound_LIBRARIES} CACHE STRING "libunbound libraries")
|
||||
set(LIBUNBOUND_VERSION ${PkgLibunbound_VERSION})
|
||||
add_library(Libunbound::Libunbound ALIAS PkgConfig::PkgLibunbound)
|
||||
set(Libunbound_FOUND ON)
|
||||
else ()
|
||||
find_path(LIBUNBOUND_INCLUDE_DIR unbound.h
|
||||
HINTS
|
||||
"${LIBUNBOUND_DIR}"
|
||||
"${LIBUNBOUND_DIR}/include"
|
||||
)
|
||||
|
||||
find_library(LIBUNBOUND_LIBRARY NAMES unbound
|
||||
HINTS
|
||||
"${LIBUNBOUND_DIR}"
|
||||
"${LIBUNBOUND_DIR}/lib"
|
||||
)
|
||||
|
||||
set(_LIBUNBOUND_LIBRARIES "")
|
||||
|
||||
if (UNIX)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
list(APPEND _LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
|
||||
list(APPEND _LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY)
|
||||
if (NOT TARGET Libunbound::Libunbound)
|
||||
add_library(Libunbound::Libunbound UNKNOWN IMPORTED)
|
||||
set_target_properties(Libunbound::Libunbound PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}"
|
||||
)
|
||||
|
||||
if(UNIX AND TARGET Threads::Threads)
|
||||
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES Threads::Threads)
|
||||
endif ()
|
||||
if(UNIX AND TARGET OpenSSL::SSL)
|
||||
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES OpenSSL::SSL)
|
||||
endif ()
|
||||
if(UNIX AND TARGET OpenSSL::Crypto)
|
||||
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES OpenSSL::Crypto)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h")
|
||||
file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+")
|
||||
string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
list(APPEND _LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}")
|
||||
set(LIBUNBOUND_LIBRARIES ${_LIBUNBOUND_LIBRARIES} CACHE STRING "libunbound libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libunbound
|
||||
REQUIRED_VARS LIBUNBOUND_LIBRARIES LIBUNBOUND_INCLUDE_DIR
|
||||
VERSION_VAR LIBUNBOUND_VERSION
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(LIBUNBOUND_INCLUDE_DIR LIBUNBOUND_LIBRARIES LIBUNBOUND_LIBRARY)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# - Try to find ZMQ
|
||||
# Once done this will define
|
||||
# ZMQ_FOUND - System has ZMQ
|
||||
# ZMQ_INCLUDE_DIRS - The ZMQ include directories
|
||||
# ZMQ_LIBRARIES - The libraries needed to use ZMQ
|
||||
# ZMQ_DEFINITIONS - Compiler switches required for using ZMQ
|
||||
|
||||
find_path ( ZMQ_INCLUDE_DIR zmq.h )
|
||||
find_library ( ZMQ_LIBRARY NAMES zmq )
|
||||
|
||||
set ( ZMQ_LIBRARIES ${ZMQ_LIBRARY} )
|
||||
set ( ZMQ_INCLUDE_DIRS ${ZMQ_INCLUDE_DIR} )
|
||||
|
||||
include ( FindPackageHandleStandardArgs )
|
||||
# handle the QUIETLY and REQUIRED arguments and set ZMQ_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args ( ZMQ DEFAULT_MSG ZMQ_LIBRARY ZMQ_INCLUDE_DIR )
|
|
@ -26,6 +26,5 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
monero_enable_coverage()
|
||||
add_subdirectory(epee)
|
||||
|
||||
|
|
|
@ -27,64 +27,52 @@
|
|||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(EPEE_INCLUDE_DIR_BASE "${CMAKE_CURRENT_SOURCE_DIR}/../include")
|
||||
file(GLOB EPEE_HEADERS_PUBLIC
|
||||
"${EPEE_INCLUDE_DIR_BASE}/*.h"
|
||||
)
|
||||
|
||||
# Add headers to the file list, to be able to search for them and autosave in IDEs.
|
||||
monero_find_all_headers(EPEE_HEADERS_PUBLIC "${EPEE_INCLUDE_DIR_BASE}")
|
||||
file(GLOB EPEE_SOURCES_PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/*.c"
|
||||
)
|
||||
|
||||
monero_add_library(epee byte_slice.cpp byte_stream.cpp hex.cpp abstract_http_client.cpp http_auth.cpp mlog.cpp net_helper.cpp net_utils_base.cpp string_tools.cpp parserse_base_utils.cpp
|
||||
wipeable_string.cpp levin_base.cpp memwipe.c connection_basic.cpp network_throttle.cpp network_throttle-detail.cpp mlocker.cpp buffer.cpp net_ssl.cpp
|
||||
int-util.cpp portable_storage.cpp
|
||||
misc_language.cpp
|
||||
file_io_utils.cpp
|
||||
net_parse_helpers.cpp
|
||||
http_base.cpp
|
||||
|
||||
add_library(epee STATIC
|
||||
${EPEE_SOURCES_PUBLIC}
|
||||
${EPEE_HEADERS_PUBLIC}
|
||||
)
|
||||
|
||||
if (USE_READLINE AND (GNU_READLINE_FOUND OR (DEPENDS AND NOT MINGW)))
|
||||
monero_add_library(epee_readline readline_buffer.cpp)
|
||||
endif()
|
||||
|
||||
set_property(SOURCE memwipe.c PROPERTY C_STANDARD 11)
|
||||
|
||||
# Build and install libepee if we're building for GUI
|
||||
if (BUILD_GUI_DEPS)
|
||||
if(IOS)
|
||||
set(lib_folder lib-${ARCH})
|
||||
else()
|
||||
set(lib_folder lib)
|
||||
endif()
|
||||
install(TARGETS epee
|
||||
ARCHIVE DESTINATION ${lib_folder})
|
||||
if (USE_READLINE AND GNU_READLINE_FOUND)
|
||||
install(TARGETS epee_readline
|
||||
ARCHIVE DESTINATION ${lib_folder})
|
||||
endif()
|
||||
endif()
|
||||
install(TARGETS epee ARCHIVE DESTINATION lib)
|
||||
|
||||
target_link_libraries(epee
|
||||
PUBLIC
|
||||
easylogging
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${OPENSSL_LIBRARIES}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
|
||||
if (USE_READLINE AND (GNU_READLINE_FOUND OR (DEPENDS AND NOT MINGW)))
|
||||
target_link_libraries(epee_readline
|
||||
PUBLIC
|
||||
easylogging
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
PRIVATE
|
||||
${GNU_READLINE_LIBRARY})
|
||||
endif()
|
||||
Boost::chrono
|
||||
Boost::filesystem
|
||||
Boost::thread
|
||||
Boost::regex
|
||||
Boost::system
|
||||
${OPENSSL_LIBRARIES})
|
||||
|
||||
target_include_directories(epee
|
||||
PUBLIC
|
||||
"${EPEE_INCLUDE_DIR_BASE}"
|
||||
"${OPENSSL_INCLUDE_DIR}")
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
install(TARGETS epee
|
||||
EXPORT epeeTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT epeeTargets
|
||||
FILE epeeTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -53,19 +53,6 @@ endif()
|
|||
|
||||
set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
|
||||
|
||||
find_package(Unbound)
|
||||
|
||||
if(NOT UNBOUND_INCLUDE_DIR)
|
||||
die("Could not find libunbound")
|
||||
else()
|
||||
message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}")
|
||||
if(UNBOUND_LIBRARIES)
|
||||
message(STATUS "Found libunbound library")
|
||||
else()
|
||||
die("Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(db_drivers)
|
||||
add_subdirectory(easylogging++)
|
||||
add_subdirectory(qrcodegen)
|
||||
|
|
|
@ -39,10 +39,13 @@ set (lmdb_sources
|
|||
mdb.c
|
||||
midl.c)
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
add_library(lmdb STATIC ${lmdb_sources})
|
||||
|
||||
target_include_directories(lmdb
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
add_library(lmdb
|
||||
${lmdb_sources})
|
||||
target_link_libraries(lmdb
|
||||
PRIVATE
|
||||
${CMAKE_THREAD_LIBS_INIT})
|
||||
|
@ -52,14 +55,22 @@ if(${ARCH_WIDTH} EQUAL 32)
|
|||
endif()
|
||||
|
||||
# GUI/libwallet install target
|
||||
if (BUILD_GUI_DEPS)
|
||||
if(IOS)
|
||||
set(lib_folder lib-${ARCH})
|
||||
else()
|
||||
set(lib_folder lib)
|
||||
endif()
|
||||
install(TARGETS lmdb
|
||||
ARCHIVE DESTINATION ${lib_folder}
|
||||
LIBRARY DESTINATION ${lib_folder})
|
||||
endif()
|
||||
install(TARGETS lmdb
|
||||
ARCHIVE DESTINATION ${lib_folder}
|
||||
LIBRARY DESTINATION ${lib_folder})
|
||||
|
||||
set_property(TARGET lmdb APPEND PROPERTY COMPILE_FLAGS "-fPIC")
|
||||
|
||||
install(TARGETS lmdb
|
||||
EXPORT lmdbTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT lmdbTargets
|
||||
FILE lmdbTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
|
@ -26,43 +26,42 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
add_library(easylogging STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/easylogging++.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/easylogging++.h
|
||||
)
|
||||
|
||||
project(easylogging CXX)
|
||||
target_compile_definitions(easylogging PUBLIC
|
||||
AUTO_INITIALIZE_EASYLOGGINGPP
|
||||
)
|
||||
target_include_directories(easylogging
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
monero_enable_coverage()
|
||||
|
||||
find_package(Threads)
|
||||
find_package(Backtrace)
|
||||
|
||||
monero_find_all_headers(EASYLOGGING_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
add_library(easylogging
|
||||
easylogging++.cc
|
||||
${EASYLOGGING_HEADERS}
|
||||
)
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
target_link_libraries(easylogging
|
||||
PRIVATE
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${Backtrace_LIBRARIES})
|
||||
|
||||
# GUI/libwallet install target
|
||||
if (BUILD_GUI_DEPS)
|
||||
if(IOS)
|
||||
set(lib_folder lib-${ARCH})
|
||||
else()
|
||||
set(lib_folder lib)
|
||||
endif()
|
||||
install(TARGETS easylogging
|
||||
ARCHIVE DESTINATION ${lib_folder}
|
||||
LIBRARY DESTINATION ${lib_folder})
|
||||
endif()
|
||||
set_property(TARGET easylogging APPEND PROPERTY COMPILE_FLAGS "-fPIC")
|
||||
install(TARGETS easylogging
|
||||
EXPORT easyloggingTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/monero/
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/monero/easylogging"
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN "*.hpp"
|
||||
PATTERN "*.inl"
|
||||
)
|
||||
|
||||
install(EXPORT easyloggingTargets
|
||||
FILE easyloggingTargets.cmake
|
||||
NAMESPACE easylogging::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/easylogging
|
||||
)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 27b099b6dd6fef6e17f58c6dfe00009e9c5df587
|
||||
Subproject commit eef8e576e55ba11f0509839c19b940b593cc467a
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 129d19ba7f496df5e33658527a7158c79b99c21c
|
|
@ -1 +1 @@
|
|||
Subproject commit 633500ad8c8759995049ccd022107d1fa8a1bbc9
|
||||
Subproject commit 7e1bb06cdbe0ef141025260f4b2c8d7d1bf85d31
|
|
@ -28,60 +28,28 @@
|
|||
#
|
||||
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
if (WIN32 OR STATIC)
|
||||
add_definitions(-DSTATICLIB)
|
||||
# miniupnp changed their static define
|
||||
add_definitions(-DMINIUPNP_STATICLIB)
|
||||
endif ()
|
||||
|
||||
function (monero_private_headers group)
|
||||
source_group("${group}\\Private"
|
||||
FILES
|
||||
${ARGN})
|
||||
endfunction ()
|
||||
|
||||
function (monero_install_headers subdir)
|
||||
install(
|
||||
FILES ${ARGN}
|
||||
DESTINATION "include/${subdir}"
|
||||
COMPONENT development)
|
||||
endfunction ()
|
||||
|
||||
function (enable_stack_trace target)
|
||||
if(STACK_TRACE)
|
||||
set_property(TARGET ${target}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "STACK_TRACE")
|
||||
if (STATIC)
|
||||
set_property(TARGET "${target}"
|
||||
APPEND PROPERTY LINK_FLAGS "-Wl,--wrap=__cxa_throw")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function (monero_add_executable name)
|
||||
source_group("${name}"
|
||||
FILES
|
||||
${ARGN})
|
||||
|
||||
add_executable("${name}"
|
||||
${ARGN})
|
||||
target_link_libraries("${name}"
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
set_property(TARGET "${name}"
|
||||
PROPERTY
|
||||
FOLDER "prog")
|
||||
set_property(TARGET "${name}"
|
||||
PROPERTY
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
enable_stack_trace("${name}")
|
||||
|
||||
monero_set_target_no_relink("${name}")
|
||||
monero_set_target_strip ("${name}")
|
||||
endfunction ()
|
||||
|
||||
include(Version)
|
||||
monero_add_library(version SOURCES ${CMAKE_BINARY_DIR}/version.cpp DEPENDS genversion)
|
||||
add_library(version STATIC ${CMAKE_BINARY_DIR}/version.cpp)
|
||||
target_include_directories(version PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_include_directories(version PRIVATE
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/external>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
install(TARGETS version
|
||||
EXPORT versionTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT versionTargets
|
||||
FILE versionTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(crypto)
|
||||
|
@ -96,6 +64,7 @@ add_subdirectory(hardforks)
|
|||
add_subdirectory(blockchain_db)
|
||||
add_subdirectory(mnemonics)
|
||||
add_subdirectory(rpc)
|
||||
#add_subdirectory(test)
|
||||
if(NOT IOS)
|
||||
add_subdirectory(serialization)
|
||||
endif()
|
||||
|
@ -110,16 +79,8 @@ if(NOT IOS)
|
|||
add_subdirectory(daemon)
|
||||
endif()
|
||||
|
||||
if(BUILD_DEBUG_UTILITIES)
|
||||
add_subdirectory(debug_utilities)
|
||||
add_subdirectory(blockchain_utilities)
|
||||
add_subdirectory(gen_multisig)
|
||||
add_subdirectory(gen_ssl_cert)
|
||||
endif()
|
||||
|
||||
if(PER_BLOCK_CHECKPOINT)
|
||||
add_subdirectory(blocks)
|
||||
endif()
|
||||
|
||||
add_subdirectory(device)
|
||||
add_subdirectory(device_trezor)
|
||||
|
|
|
@ -26,28 +26,39 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(blockchain_db_sources
|
||||
blockchain_db.cpp
|
||||
lmdb/db_lmdb.cpp
|
||||
)
|
||||
file(GLOB BCDB_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h
|
||||
lmdb/db_lmdb.cpp
|
||||
lmdb/db_lmdb.h)
|
||||
|
||||
set(blockchain_db_headers)
|
||||
|
||||
monero_find_all_headers(blockchain_db_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(blockchain_db
|
||||
${crypto_private_headers})
|
||||
monero_add_library(blockchain_db
|
||||
${blockchain_db_sources}
|
||||
${blockchain_db_headers}
|
||||
${blockchain_db_private_headers})
|
||||
add_library(blockchain_db STATIC ${BCDB_SOURCES})
|
||||
target_link_libraries(blockchain_db
|
||||
PUBLIC
|
||||
common
|
||||
cncrypto
|
||||
ringct
|
||||
${LMDB_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
lmdb
|
||||
Boost::filesystem
|
||||
Boost::thread)
|
||||
|
||||
target_include_directories(blockchain_db PRIVATE
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/external>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
install(TARGETS blockchain_db
|
||||
EXPORT blockchainDbTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT blockchainDbTargets
|
||||
FILE blockchainDbTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
|
@ -57,4 +57,24 @@ foreach(BLOB_NAME checkpoints)
|
|||
)
|
||||
endforeach()
|
||||
|
||||
monero_add_library(blocks blocks.cpp ${GENERATED_SOURCES})
|
||||
add_library(blocks STATIC blocks.cpp ${GENERATED_SOURCES})
|
||||
|
||||
target_include_directories(blocks
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/contrib/epee/include>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
install(TARGETS blocks
|
||||
EXPORT blocksTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT blocksTargets
|
||||
FILE blocksTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,38 +26,33 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
if(APPLE)
|
||||
if(DEPENDS)
|
||||
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework ApplicationServices -framework AppKit -framework IOKit")
|
||||
else()
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
mark_as_advanced(IOKIT_LIBRARY)
|
||||
list(APPEND EXTRA_LIBRARIES ${IOKIT_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
add_library(checkpoints STATIC checkpoints.cpp checkpoints.h)
|
||||
|
||||
set(checkpoints_sources
|
||||
checkpoints.cpp)
|
||||
|
||||
set(checkpoints_headers)
|
||||
|
||||
monero_find_all_headers(checkpoints_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(checkpoints
|
||||
${checkpoints_private_headers})
|
||||
monero_add_library(checkpoints
|
||||
${checkpoints_sources}
|
||||
${checkpoints_headers}
|
||||
${checkpoints_private_headers})
|
||||
target_link_libraries(checkpoints
|
||||
PUBLIC
|
||||
target_link_libraries(checkpoints PUBLIC
|
||||
common
|
||||
cncrypto
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_SERIALIZATION_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
Boost::date_time
|
||||
Boost::program_options
|
||||
Boost::serialization
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
Boost::thread)
|
||||
|
||||
target_include_directories(checkpoints
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
install(TARGETS checkpoints
|
||||
EXPORT checkpointsTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT checkpointsTargets
|
||||
FILE checkpointsTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -28,49 +28,19 @@
|
|||
|
||||
include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
set(common_sources
|
||||
base58.cpp
|
||||
command_line.cpp
|
||||
dns_utils.cpp
|
||||
download.cpp
|
||||
error.cpp
|
||||
expect.cpp
|
||||
util.cpp
|
||||
i18n.cpp
|
||||
notify.cpp
|
||||
password.cpp
|
||||
perf_timer.cpp
|
||||
pruning.cpp
|
||||
spawn.cpp
|
||||
threadpool.cpp
|
||||
updates.cpp
|
||||
aligned.c
|
||||
timings.cc
|
||||
combinator.cpp)
|
||||
file(GLOB COMMON_SOURCES
|
||||
"*.cpp"
|
||||
"*.c"
|
||||
"*.h"
|
||||
)
|
||||
|
||||
if (STACK_TRACE)
|
||||
list(APPEND common_sources stack_trace.cpp)
|
||||
endif()
|
||||
add_library(common STATIC ${COMMON_SOURCES})
|
||||
|
||||
if (BACKCOMPAT)
|
||||
list(APPEND common_sources compat/glibc_compat.cpp)
|
||||
endif()
|
||||
|
||||
set(common_headers)
|
||||
|
||||
monero_find_all_headers(common_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(common
|
||||
${common_private_headers})
|
||||
monero_add_library(common
|
||||
${common_sources}
|
||||
${common_headers}
|
||||
${common_private_headers}
|
||||
DEPENDS generate_translations_header)
|
||||
target_link_libraries(common
|
||||
PUBLIC
|
||||
cncrypto
|
||||
${UNBOUND_LIBRARIES}
|
||||
easylogging
|
||||
${LIBUNBOUND_LIBRARIES}
|
||||
${LIBUNWIND_LIBRARIES}
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
|
@ -79,8 +49,27 @@ target_link_libraries(common
|
|||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
PRIVATE
|
||||
${OPENSSL_LIBRARIES}
|
||||
${EXTRA_LIBRARIES})
|
||||
${OPENSSL_LIBRARIES})
|
||||
|
||||
#monero_install_headers(common
|
||||
# ${common_headers})
|
||||
target_include_directories(common
|
||||
PRIVATE ${LIBUNBOUND_INCLUDE_DIR}
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../>
|
||||
PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/translations>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monero/>
|
||||
)
|
||||
|
||||
add_dependencies(common generate_translations_header)
|
||||
|
||||
install(TARGETS common
|
||||
EXPORT commonTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT commonTargets
|
||||
FILE commonTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#else
|
||||
#define ELPP_FEATURE_CRASH_LOG 1
|
||||
#endif
|
||||
#include "easylogging++/easylogging++.h"
|
||||
#include "easylogging++.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#ifdef USE_UNWIND
|
||||
|
|
|
@ -26,77 +26,60 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(crypto_sources
|
||||
aesb.c
|
||||
blake256.c
|
||||
chacha.c
|
||||
crypto-ops-data.c
|
||||
crypto-ops.c
|
||||
crypto.cpp
|
||||
groestl.c
|
||||
hash-extra-blake.c
|
||||
hash-extra-groestl.c
|
||||
hash-extra-jh.c
|
||||
hash-extra-skein.c
|
||||
hash.c
|
||||
hmac-keccak.c
|
||||
jh.c
|
||||
keccak.c
|
||||
oaes_lib.c
|
||||
random.c
|
||||
skein.c
|
||||
slow-hash.c
|
||||
rx-slow-hash.c
|
||||
CryptonightR_JIT.c
|
||||
tree-hash.c)
|
||||
file(GLOB CRYPTO_SOURCES
|
||||
"*.c"
|
||||
"*.cpp"
|
||||
"*.h")
|
||||
|
||||
if(ARCH_ID STREQUAL "i386" OR ARCH_ID STREQUAL "x86_64" OR ARCH_ID STREQUAL "x86-64" OR ARCH_ID STREQUAL "amd64")
|
||||
list(APPEND crypto_sources CryptonightR_template.S)
|
||||
if(NOT ARM)
|
||||
list(APPEND CRYPTO_SOURCES CryptonightR_template.S)
|
||||
endif()
|
||||
|
||||
include_directories(${RANDOMX_INCLUDE})
|
||||
|
||||
set(crypto_headers)
|
||||
|
||||
monero_find_all_headers(crypto_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(cncrypto
|
||||
${crypto_private_headers})
|
||||
monero_add_library(cncrypto
|
||||
${crypto_sources}
|
||||
${crypto_headers}
|
||||
${crypto_private_headers})
|
||||
add_library(cncrypto STATIC ${CRYPTO_SOURCES})
|
||||
target_link_libraries(cncrypto
|
||||
PUBLIC
|
||||
epee
|
||||
randomx
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${SODIUM_LIBRARY}
|
||||
Boost::system
|
||||
${sodium_LIBRARY_RELEASE}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
${OPENSSL_LIBRARIES})
|
||||
|
||||
if (ARM)
|
||||
option(NO_OPTIMIZED_MULTIPLY_ON_ARM
|
||||
"Compute multiply using generic C implementation instead of ARM ASM" OFF)
|
||||
if(NO_OPTIMIZED_MULTIPLY_ON_ARM)
|
||||
message(STATUS "Using generic C implementation for multiply")
|
||||
set_property(SOURCE slow-hash.c
|
||||
PROPERTY COMPILE_DEFINITIONS "NO_OPTIMIZED_MULTIPLY_ON_ARM")
|
||||
endif()
|
||||
target_include_directories(cncrypto PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${sodium_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if (ARM AND NO_OPTIMIZED_MULTIPLY_ON_ARM)
|
||||
message(STATUS "Using generic C implementation for multiply")
|
||||
set_property(SOURCE slow-hash.c
|
||||
PROPERTY COMPILE_DEFINITIONS "NO_OPTIMIZED_MULTIPLY_ON_ARM")
|
||||
endif()
|
||||
|
||||
# Because of the way Qt works on android with JNI, the code does not live in the main android thread
|
||||
# So this code runs with a 1 MB default stack size.
|
||||
# This will force the use of the heap for the allocation of the scratchpad
|
||||
if (ANDROID OR IOS)
|
||||
if( BUILD_GUI_DEPS )
|
||||
add_definitions(-DFORCE_USE_HEAP=1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# cheat because cmake and ccache hate each other
|
||||
set_property(SOURCE CryptonightR_template.S PROPERTY LANGUAGE C)
|
||||
set_property(SOURCE CryptonightR_template.S PROPERTY LANGUAGE ASM)
|
||||
set_property(SOURCE CryptonightR_template.S PROPERTY XCODE_EXPLICIT_FILE_TYPE sourcecode.asm)
|
||||
|
||||
# Must be done last, because it references libraries in this directory
|
||||
add_subdirectory(wallet)
|
||||
|
||||
install(TARGETS cncrypto
|
||||
EXPORT cncryptoTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT cncryptoTargets
|
||||
FILE cncryptoTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
|
@ -61,11 +61,11 @@ static void generate_system_random_bytes(size_t n, void *result) {
|
|||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
static void generate_system_random_bytes(size_t n, void *result) {
|
||||
int fd;
|
||||
|
|
|
@ -27,37 +27,28 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#
|
||||
# Possibly user defined values.
|
||||
#
|
||||
set(MONERO_WALLET_CRYPTO_LIBRARY "auto" CACHE STRING "Select a wallet crypto library")
|
||||
include(CheckLanguage)
|
||||
check_language(ASM-ATT)
|
||||
|
||||
#
|
||||
# If the user specified "auto", detect best library defaulting to internal.
|
||||
#
|
||||
if (${MONERO_WALLET_CRYPTO_LIBRARY} STREQUAL "auto")
|
||||
monero_crypto_autodetect(AVAILABLE BEST)
|
||||
if (DEFINED BEST)
|
||||
message("Wallet crypto is using ${BEST} backend")
|
||||
set(MONERO_WALLET_CRYPTO_LIBRARY ${BEST})
|
||||
else ()
|
||||
message("Defaulting to internal crypto library for wallet")
|
||||
set(MONERO_WALLET_CRYPTO_LIBRARY "cn")
|
||||
endif ()
|
||||
endif ()
|
||||
add_library(wallet-crypto STATIC crypto.h)
|
||||
|
||||
#
|
||||
# Configure library target "wallet-crypto" - clients will use this as a
|
||||
# library dependency which in turn will depend on the crypto library selected.
|
||||
#
|
||||
if (${MONERO_WALLET_CRYPTO_LIBRARY} STREQUAL "cn")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/empty.h.in ${MONERO_GENERATED_HEADERS_DIR}/crypto/wallet/ops.h)
|
||||
add_library(wallet-crypto ALIAS cncrypto)
|
||||
else ()
|
||||
monero_crypto_generate_header(${MONERO_WALLET_CRYPTO_LIBRARY} "${MONERO_GENERATED_HEADERS_DIR}/crypto/wallet/ops.h")
|
||||
monero_crypto_get_target(${MONERO_WALLET_CRYPTO_LIBRARY} CRYPTO_TARGET)
|
||||
add_library(wallet-crypto $<TARGET_OBJECTS:${CRYPTO_TARGET}>)
|
||||
target_link_libraries(wallet-crypto cncrypto)
|
||||
endif ()
|
||||
target_include_directories(wallet-crypto
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/generated_include>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monero/>
|
||||
)
|
||||
|
||||
target_link_libraries(wallet-crypto cncrypto)
|
||||
|
||||
install(TARGETS wallet-crypto
|
||||
EXPORT walletCryptoTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT walletCryptoTargets
|
||||
FILE walletCryptoTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
|
@ -26,56 +26,66 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
if(APPLE)
|
||||
if(DEPENDS)
|
||||
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework ApplicationServices -framework AppKit -framework IOKit")
|
||||
else()
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
mark_as_advanced(IOKIT_LIBRARY)
|
||||
list(APPEND EXTRA_LIBRARIES ${IOKIT_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
file(GLOB CN_BASIC_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
monero_add_library(cryptonote_format_utils_basic
|
||||
cryptonote_format_utils_basic.cpp
|
||||
)
|
||||
target_link_libraries(cryptonote_format_utils_basic
|
||||
PUBLIC
|
||||
cncrypto
|
||||
)
|
||||
# cryptonote_format_utils_basic
|
||||
add_library(cryptonote_format_utils_basic STATIC cryptonote_format_utils_basic.cpp)
|
||||
target_link_libraries(cryptonote_format_utils_basic PUBLIC cncrypto)
|
||||
target_include_directories(cryptonote_format_utils_basic
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
set(cryptonote_basic_sources
|
||||
account.cpp
|
||||
connection_context.cpp
|
||||
cryptonote_basic_impl.cpp
|
||||
cryptonote_format_utils.cpp
|
||||
difficulty.cpp
|
||||
hardfork.cpp
|
||||
merge_mining.cpp
|
||||
miner.cpp)
|
||||
|
||||
set(cryptonote_basic_headers)
|
||||
|
||||
monero_find_all_headers(cryptonote_basic_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(cryptonote_basic
|
||||
${cryptonote_basic_private_headers})
|
||||
monero_add_library(cryptonote_basic
|
||||
${cryptonote_basic_sources}
|
||||
${cryptonote_basic_headers}
|
||||
${cryptonote_basic_private_headers})
|
||||
# cryptonote_basic
|
||||
add_library(cryptonote_basic STATIC ${CN_BASIC_SOURCES})
|
||||
target_link_libraries(cryptonote_basic
|
||||
PUBLIC
|
||||
common
|
||||
cncrypto
|
||||
checkpoints
|
||||
cryptonote_format_utils_basic
|
||||
device
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_SERIALIZATION_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
Boost::date_time
|
||||
Boost::program_options
|
||||
Boost::serialization
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
Boost::thread)
|
||||
|
||||
target_include_directories(cryptonote_basic
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
## installs
|
||||
|
||||
install(TARGETS cryptonote_basic
|
||||
EXPORT cryptonoteBasicTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT cryptonoteBasicTargets
|
||||
FILE cryptonoteBasicTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
||||
install(TARGETS cryptonote_format_utils_basic
|
||||
EXPORT cryptonoteFormatUtilsBasicTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT cryptonoteFormatUtilsBasicTargets
|
||||
FILE cryptonoteFormatUtilsBasicTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,25 +26,13 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(cryptonote_core_sources
|
||||
blockchain.cpp
|
||||
cryptonote_core.cpp
|
||||
tx_pool.cpp
|
||||
tx_sanity_check.cpp
|
||||
cryptonote_tx_utils.cpp
|
||||
tx_verification_utils.cpp
|
||||
)
|
||||
file(GLOB CN_CORE_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
set(cryptonote_core_headers)
|
||||
|
||||
monero_find_all_headers(cryptonote_core_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(cryptonote_core
|
||||
${cryptonote_core_private_headers})
|
||||
monero_add_library(cryptonote_core
|
||||
${cryptonote_core_sources}
|
||||
${cryptonote_core_headers}
|
||||
${cryptonote_core_private_headers})
|
||||
add_library(cryptonote_core STATIC ${CN_CORE_SOURCES})
|
||||
target_link_libraries(cryptonote_core
|
||||
PUBLIC
|
||||
version
|
||||
|
@ -54,11 +42,28 @@ target_link_libraries(cryptonote_core
|
|||
ringct
|
||||
device
|
||||
hardforks
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_SERIALIZATION_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
Boost::date_time
|
||||
Boost::program_options
|
||||
Boost::serialization
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
Boost::thread)
|
||||
|
||||
target_include_directories(cryptonote_core PRIVATE
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/external>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
install(TARGETS cryptonote_core
|
||||
EXPORT cryptonoteCoreTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT cryptonoteCoreTargets
|
||||
FILE cryptonoteCoreTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,16 +26,13 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cmake_minimum_required (VERSION 3.5)
|
||||
project (monero CXX)
|
||||
file(GLOB CN_PROT_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
file(GLOB CRYPTONOTE_PROTOCOL *)
|
||||
source_group(cryptonote_protocol FILES ${CRYPTONOTE_PROTOCOL})
|
||||
|
||||
#monero_private_headers(cryptonote_protocol ${CRYPTONOTE_PROTOCOL})
|
||||
monero_add_library(cryptonote_protocol ${CRYPTONOTE_PROTOCOL})
|
||||
target_link_libraries(cryptonote_protocol
|
||||
PUBLIC
|
||||
p2p
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
add_library(cryptonote_protocol STATIC ${CN_PROT_SOURCES})
|
||||
target_link_libraries(cryptonote_protocol PUBLIC p2p)
|
||||
target_include_directories(cryptonote_protocol
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR})
|
|
@ -26,25 +26,14 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(daemon_sources
|
||||
command_parser_executor.cpp
|
||||
command_server.cpp
|
||||
daemon.cpp
|
||||
executor.cpp
|
||||
main.cpp
|
||||
rpc_command_executor.cpp
|
||||
)
|
||||
file(GLOB DAEMON_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
set(daemon_headers)
|
||||
add_executable(daemon ${DAEMON_SOURCES})
|
||||
|
||||
monero_find_all_headers(daemon_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(daemon
|
||||
${daemon_private_headers})
|
||||
monero_add_executable(daemon
|
||||
${daemon_sources}
|
||||
${daemon_headers}
|
||||
${daemon_private_headers})
|
||||
target_link_libraries(daemon
|
||||
PRIVATE
|
||||
rpc
|
||||
|
@ -65,10 +54,21 @@ target_link_libraries(daemon
|
|||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
|
||||
Boost::chrono
|
||||
Boost::program_options
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
Boost::thread
|
||||
Boost::regex
|
||||
|
||||
${ZMQ_LIB}
|
||||
${GNU_READLINE_LIBRARY}
|
||||
${EXTRA_LIBRARIES}
|
||||
${Blocks})
|
||||
blocks)
|
||||
|
||||
target_include_directories(daemon
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
set_property(TARGET daemon
|
||||
PROPERTY
|
||||
OUTPUT_NAME "wownerod")
|
||||
|
|
|
@ -58,17 +58,17 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|||
add_definitions(-DDEBUG_TMPDIR_LOG=1)
|
||||
endif()
|
||||
|
||||
monero_private_headers(daemonizer
|
||||
${daemonizer_private_headers})
|
||||
monero_add_library(daemonizer
|
||||
add_library(daemonizer STATIC
|
||||
${daemonizer_sources}
|
||||
${daemonizer_headers}
|
||||
${daemonizer_private_headers})
|
||||
|
||||
target_link_libraries(daemonizer
|
||||
PUBLIC
|
||||
common
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
Boost::chrono
|
||||
Boost::filesystem
|
||||
Boost::program_options)
|
||||
|
||||
target_include_directories(daemonizer PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../)
|
|
@ -26,57 +26,44 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(device_sources
|
||||
add_library(device STATIC
|
||||
device.cpp
|
||||
device_default.cpp
|
||||
log.cpp
|
||||
)
|
||||
|
||||
if(HIDAPI_FOUND)
|
||||
set(device_sources
|
||||
${device_sources}
|
||||
device_ledger.cpp
|
||||
device_io_hid.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(device_headers
|
||||
device.hpp
|
||||
device_io.hpp
|
||||
device_default.hpp
|
||||
device_cold.hpp
|
||||
log.hpp
|
||||
)
|
||||
|
||||
if(HIDAPI_FOUND)
|
||||
set(device_headers
|
||||
${device_headers}
|
||||
device_ledger.hpp
|
||||
device_io_hid.hpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(device_private_headers)
|
||||
|
||||
|
||||
monero_private_headers(device
|
||||
${device_private_headers})
|
||||
|
||||
monero_add_library(device
|
||||
${device_sources}
|
||||
${device_headers}
|
||||
${device_private_headers})
|
||||
log.hpp)
|
||||
|
||||
target_link_libraries(device
|
||||
PUBLIC
|
||||
${HIDAPI_LIBRARIES}
|
||||
cncrypto
|
||||
cryptonote_format_utils_basic
|
||||
ringct_basic
|
||||
wallet-crypto
|
||||
monero-crypto-amd64-64-24k
|
||||
${OPENSSL_CRYPTO_LIBRARIES}
|
||||
${Boost_SERIALIZATION_LIBRARY}
|
||||
Boost::serialization
|
||||
PRIVATE
|
||||
version
|
||||
${Blocks}
|
||||
${EXTRA_LIBRARIES})
|
||||
blocks)
|
||||
|
||||
target_include_directories(device
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
install(TARGETS device
|
||||
EXPORT deviceTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT deviceTargets
|
||||
FILE deviceTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,21 +26,25 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(hardforks_sources
|
||||
hardforks.cpp)
|
||||
file(GLOB HARDFORKS_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
monero_find_all_headers(hardforks_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
add_library(hardforks STATIC ${HARDFORKS_SOURCES})
|
||||
target_link_libraries(hardforks PUBLIC version)
|
||||
|
||||
set(hardforks_private_headers)
|
||||
install(TARGETS hardforks
|
||||
EXPORT hardforksTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
monero_private_headers(hardforks
|
||||
${hardforks_private_headers})
|
||||
monero_add_library(hardforks
|
||||
${hardforks_sources}
|
||||
${hardforks_headers}
|
||||
${hardforks_private_headers})
|
||||
target_link_libraries(hardforks
|
||||
PUBLIC
|
||||
version
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
install(EXPORT hardforksTargets
|
||||
FILE hardforksTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,8 +26,27 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(lmdb_sources database.cpp error.cpp table.cpp value_stream.cpp)
|
||||
monero_find_all_headers(lmdb_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
file(GLOB LMDB_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
monero_add_library(lmdb_lib ${lmdb_sources} ${lmdb_headers})
|
||||
target_link_libraries(lmdb_lib common ${LMDB_LIBRARY})
|
||||
add_library(lmdb_lib STATIC ${LMDB_SOURCES})
|
||||
target_link_libraries(lmdb_lib PRIVATE
|
||||
common
|
||||
${LMDB_LIBRARY})
|
||||
|
||||
install(TARGETS lmdb_lib
|
||||
EXPORT lmdbLibTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT lmdbLibTargets
|
||||
FILE lmdbLibTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,23 +26,34 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(mnemonics_sources
|
||||
electrum-words.cpp)
|
||||
file(GLOB MN_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
set(mnemonics_headers)
|
||||
|
||||
monero_find_all_headers(mnemonics_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(mnemonics
|
||||
${mnemonics_private_headers})
|
||||
monero_add_library(mnemonics
|
||||
${mnemonics_sources}
|
||||
${mnemonics_headers}
|
||||
${mnemonics_private_headers})
|
||||
add_library(mnemonics STATIC ${MN_SOURCES})
|
||||
target_link_libraries(mnemonics
|
||||
PUBLIC
|
||||
epee
|
||||
easylogging
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
Boost::system)
|
||||
|
||||
target_include_directories(mnemonics
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
install(TARGETS mnemonics
|
||||
EXPORT mnemonicsTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT mnemonicsTargets
|
||||
FILE mnemonicsTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,32 +26,31 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(multisig_sources
|
||||
multisig.cpp
|
||||
multisig_account.cpp
|
||||
multisig_account_kex_impl.cpp
|
||||
multisig_clsag_context.cpp
|
||||
multisig_kex_msg.cpp
|
||||
multisig_tx_builder_ringct.cpp)
|
||||
|
||||
set(multisig_headers)
|
||||
|
||||
monero_find_all_headers(multisig_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(multisig
|
||||
${multisig_private_headers})
|
||||
|
||||
monero_add_library(multisig
|
||||
${multisig_sources}
|
||||
${multisig_headers}
|
||||
${multisig_private_headers})
|
||||
file(GLOB MULTISIG_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
add_library(multisig STATIC ${MULTISIG_SOURCES})
|
||||
target_link_libraries(multisig
|
||||
PUBLIC
|
||||
ringct
|
||||
cryptonote_basic
|
||||
cryptonote_core
|
||||
common
|
||||
cncrypto
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
cncrypto)
|
||||
|
||||
install(TARGETS multisig
|
||||
EXPORT multisigTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT multisigTargets
|
||||
FILE multisigTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -27,10 +27,33 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(net_sources dandelionpp.cpp error.cpp http.cpp i2p_address.cpp parse.cpp resolve.cpp
|
||||
socks.cpp socks_connect.cpp tor_address.cpp zmq.cpp)
|
||||
monero_find_all_headers(net_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
file(GLOB NET_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
monero_add_library(net ${net_sources} ${net_headers})
|
||||
target_link_libraries(net common epee ${ZMQ_LIB} ${Boost_ASIO_LIBRARY})
|
||||
add_library(net STATIC ${NET_SOURCES})
|
||||
target_link_libraries(net
|
||||
common
|
||||
epee
|
||||
${ZMQ_LIBRARIES}
|
||||
Boost::system)
|
||||
|
||||
target_include_directories(net
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
install(TARGETS net
|
||||
EXPORT netTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT netTargets
|
||||
FILE netTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,27 +26,27 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cmake_minimum_required (VERSION 3.5)
|
||||
project (monero CXX)
|
||||
file(GLOB P2P_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
file(GLOB P2P *)
|
||||
source_group(p2p FILES ${P2P})
|
||||
|
||||
#add_library(p2p ${P2P})
|
||||
|
||||
#monero_private_headers(p2p ${P2P})
|
||||
monero_add_library(p2p ${P2P})
|
||||
add_library(p2p STATIC ${P2P_SOURCES})
|
||||
target_link_libraries(p2p
|
||||
PUBLIC
|
||||
version
|
||||
cryptonote_core
|
||||
net
|
||||
${UPNP_LIBRARIES}
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${Boost_SERIALIZATION_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
Boost::chrono
|
||||
Boost::program_options
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
Boost::thread
|
||||
Boost::serialization)
|
||||
|
||||
target_include_directories(p2p
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
PUBLIC ${CMAKE_SOURCE_DIR}/external
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR})
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (c) 2014-2022, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <malloc.h>
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (c) 2014-2022, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#pragma once
|
||||
|
||||
#define alloca(size) _alloca(size)
|
|
@ -1,35 +0,0 @@
|
|||
// Copyright (c) 2014-2022, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define inline __inline
|
||||
#endif
|
|
@ -1,39 +0,0 @@
|
|||
// Copyright (c) 2014-2022, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
|
||||
typedef int bool;
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
#endif
|
|
@ -1,36 +0,0 @@
|
|||
// Copyright (c) 2014-2022, The Monero Project
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are
|
||||
// permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
// conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
// of conditions and the following disclaimer in the documentation and/or other
|
||||
// materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||
// used to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
#pragma once
|
||||
|
||||
#define LITTLE_ENDIAN 1234
|
||||
#define BIG_ENDIAN 4321
|
||||
#define PDP_ENDIAN 3412
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
|
@ -26,46 +26,30 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(ringct_basic_sources
|
||||
rctOps.cpp
|
||||
rctTypes.cpp
|
||||
rctCryptoOps.c
|
||||
multiexp.cc
|
||||
bulletproofs.cc
|
||||
bulletproofs2.cc
|
||||
bulletproofs_plus.cc)
|
||||
file(GLOB RINGCT_BASIC_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
monero_find_all_headers(ringct_basic_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(ringct_basic
|
||||
${crypto_private_headers})
|
||||
monero_add_library(ringct_basic
|
||||
${ringct_basic_sources}
|
||||
${ringct_basic_private_headers})
|
||||
add_library(ringct_basic STATIC ${RINGCT_BASIC_SOURCES})
|
||||
target_link_libraries(ringct_basic
|
||||
PUBLIC
|
||||
common
|
||||
cncrypto
|
||||
PRIVATE
|
||||
${OPENSSL_LIBRARIES}
|
||||
${EXTRA_LIBRARIES})
|
||||
${OPENSSL_LIBRARIES})
|
||||
|
||||
set(ringct_sources
|
||||
rctSigs.cpp
|
||||
target_include_directories(ringct_basic
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_library(ringct STATIC
|
||||
rctSigs.cpp
|
||||
rctSigs.h
|
||||
)
|
||||
|
||||
set(ringct_headers)
|
||||
|
||||
set(ringct_private_headers
|
||||
rctSigs.h
|
||||
)
|
||||
|
||||
monero_private_headers(ringct
|
||||
${crypto_private_headers})
|
||||
monero_add_library(ringct
|
||||
${ringct_sources}
|
||||
${ringct_headers}
|
||||
${ringct_private_headers})
|
||||
target_link_libraries(ringct
|
||||
PUBLIC
|
||||
common
|
||||
|
@ -73,5 +57,40 @@ target_link_libraries(ringct
|
|||
cryptonote_basic
|
||||
device
|
||||
PRIVATE
|
||||
${OPENSSL_LIBRARIES}
|
||||
${EXTRA_LIBRARIES})
|
||||
${OPENSSL_LIBRARIES})
|
||||
|
||||
target_include_directories(ringct
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
## installs
|
||||
|
||||
install(TARGETS ringct_basic
|
||||
EXPORT ringctBasicTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT ringctBasicTargets
|
||||
FILE ringctBasicTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS ringct
|
||||
EXPORT ringctTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT ringctTargets
|
||||
FILE ringctTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -26,14 +26,58 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#@TODO: sus
|
||||
include_directories(SYSTEM ${ZMQ_INCLUDE_PATH})
|
||||
|
||||
set(rpc_base_sources
|
||||
# rpc base
|
||||
|
||||
add_library(rpc_base STATIC
|
||||
rpc_args.h
|
||||
rpc_payment_signature.h
|
||||
rpc_handler.h
|
||||
rpc_args.cpp
|
||||
rpc_payment_signature.cpp
|
||||
rpc_handler.cpp)
|
||||
|
||||
set(rpc_sources
|
||||
target_link_libraries(rpc_base
|
||||
PUBLIC
|
||||
common
|
||||
epee
|
||||
Boost::regex
|
||||
Boost::thread
|
||||
Boost::program_options)
|
||||
|
||||
target_include_directories(rpc_base
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monero>
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
install(TARGETS rpc_base
|
||||
EXPORT rpcBaseTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT rpcBaseTargets
|
||||
FILE rpcBaseTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
||||
|
||||
# rpc
|
||||
|
||||
add_library(rpc STATIC
|
||||
rpc_version_str.h
|
||||
rpc_handler.h
|
||||
bootstrap_daemon.h
|
||||
core_rpc_server.h
|
||||
rpc_payment.h
|
||||
core_rpc_server_commands_defs.h
|
||||
core_rpc_server_error_codes.h
|
||||
bootstrap_daemon.cpp
|
||||
bootstrap_node_selector.cpp
|
||||
core_rpc_server.cpp
|
||||
|
@ -41,94 +85,6 @@ set(rpc_sources
|
|||
rpc_version_str.cpp
|
||||
instanciations.cpp)
|
||||
|
||||
set(daemon_messages_sources
|
||||
message.cpp
|
||||
daemon_messages.cpp)
|
||||
|
||||
set(rpc_pub_sources zmq_pub.cpp)
|
||||
|
||||
set(daemon_rpc_server_sources
|
||||
daemon_handler.cpp
|
||||
zmq_pub.cpp
|
||||
zmq_server.cpp)
|
||||
|
||||
|
||||
set(rpc_base_headers
|
||||
rpc_args.h
|
||||
rpc_payment_signature.h
|
||||
rpc_handler.h)
|
||||
|
||||
set(rpc_headers
|
||||
rpc_version_str.h
|
||||
rpc_handler.h)
|
||||
|
||||
set(rpc_pub_headers zmq_pub.h)
|
||||
|
||||
set(daemon_rpc_server_headers)
|
||||
|
||||
set(rpc_private_headers
|
||||
bootstrap_daemon.h
|
||||
core_rpc_server.h
|
||||
rpc_payment.h
|
||||
core_rpc_server_commands_defs.h
|
||||
core_rpc_server_error_codes.h)
|
||||
|
||||
set(daemon_messages_private_headers
|
||||
message.h
|
||||
daemon_messages.h)
|
||||
|
||||
set(daemon_rpc_server_private_headers
|
||||
message.h
|
||||
daemon_messages.h
|
||||
daemon_handler.h
|
||||
zmq_server.h)
|
||||
|
||||
|
||||
monero_private_headers(rpc
|
||||
${rpc_private_headers})
|
||||
|
||||
set(rpc_pub_private_headers)
|
||||
|
||||
monero_private_headers(daemon_rpc_server
|
||||
${daemon_rpc_server_private_headers})
|
||||
|
||||
|
||||
monero_add_library(rpc_base
|
||||
${rpc_base_sources}
|
||||
${rpc_base_headers}
|
||||
${rpc_base_private_headers})
|
||||
|
||||
monero_add_library(rpc
|
||||
${rpc_sources}
|
||||
${rpc_headers}
|
||||
${rpc_private_headers})
|
||||
|
||||
monero_add_library(rpc_pub
|
||||
${rpc_pub_sources}
|
||||
${rpc_pub_headers}
|
||||
${rpc_pub_private_headers})
|
||||
|
||||
monero_add_library(daemon_messages
|
||||
${daemon_messages_sources}
|
||||
${daemon_messages_headers}
|
||||
${daemon_messages_private_headers})
|
||||
|
||||
monero_add_library(daemon_rpc_server
|
||||
${daemon_rpc_server_sources}
|
||||
${daemon_rpc_server_headers}
|
||||
${daemon_rpc_server_private_headers})
|
||||
|
||||
|
||||
target_link_libraries(rpc_base
|
||||
PUBLIC
|
||||
common
|
||||
epee
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
|
||||
target_link_libraries(rpc
|
||||
PUBLIC
|
||||
rpc_base
|
||||
|
@ -137,10 +93,18 @@ target_link_libraries(rpc
|
|||
cryptonote_protocol
|
||||
net
|
||||
version
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
Boost::regex
|
||||
Boost::thread)
|
||||
|
||||
target_include_directories(rpc
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
# rpc pub
|
||||
|
||||
add_library(rpc_pub STATIC
|
||||
zmq_pub.cpp
|
||||
zmq_pub.h)
|
||||
|
||||
target_link_libraries(rpc_pub
|
||||
PUBLIC
|
||||
|
@ -148,15 +112,37 @@ target_link_libraries(rpc_pub
|
|||
net
|
||||
cryptonote_basic
|
||||
serialization
|
||||
${Boost_THREAD_LIBRARY})
|
||||
Boost::thread)
|
||||
|
||||
target_include_directories(rpc_pub
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
# daemon messages
|
||||
|
||||
add_library(daemon_messages STATIC
|
||||
message.cpp
|
||||
daemon_messages.cpp
|
||||
message.h
|
||||
daemon_messages.h)
|
||||
|
||||
target_link_libraries(daemon_messages
|
||||
LINK_PRIVATE
|
||||
cryptonote_core
|
||||
cryptonote_protocol
|
||||
version
|
||||
serialization
|
||||
${EXTRA_LIBRARIES})
|
||||
serialization)
|
||||
|
||||
# daemon rpc server
|
||||
|
||||
add_library(daemon_rpc_server
|
||||
daemon_handler.cpp
|
||||
zmq_pub.cpp
|
||||
zmq_server.cpp
|
||||
message.h
|
||||
daemon_messages.h
|
||||
daemon_handler.h
|
||||
zmq_server.h)
|
||||
|
||||
target_link_libraries(daemon_rpc_server
|
||||
LINK_PRIVATE
|
||||
|
@ -167,11 +153,13 @@ target_link_libraries(daemon_rpc_server
|
|||
version
|
||||
daemon_messages
|
||||
serialization
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${ZMQ_LIB}
|
||||
${EXTRA_LIBRARIES})
|
||||
target_include_directories(daemon_rpc_server PUBLIC ${ZMQ_INCLUDE_PATH})
|
||||
target_include_directories(obj_daemon_rpc_server PUBLIC ${ZMQ_INCLUDE_PATH})
|
||||
Boost::chrono
|
||||
Boost::regex
|
||||
Boost::system
|
||||
Boost::thread
|
||||
${ZMQ_LIB})
|
||||
|
||||
target_include_directories(daemon_rpc_server
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
PUBLIC ${ZMQ_INCLUDE_PATH}
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
|
|
|
@ -26,30 +26,23 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(serialization_sources
|
||||
json_object.cpp)
|
||||
file(GLOB SER_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
set(serialization_headers)
|
||||
add_library(serialization STATIC ${SER_SOURCES})
|
||||
|
||||
monero_find_all_headers(serialization_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(serialization
|
||||
${serialization_private_headers})
|
||||
monero_add_library(serialization
|
||||
${serialization_sources}
|
||||
${serialization_headers}
|
||||
${serialization_private_headers})
|
||||
target_link_libraries(serialization
|
||||
LINK_PRIVATE
|
||||
cryptonote_basic
|
||||
cryptonote_core
|
||||
cryptonote_protocol
|
||||
epee
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${EXTRA_LIBRARIES})
|
||||
add_dependencies(serialization
|
||||
version)
|
||||
Boost::chrono
|
||||
Boost::regex
|
||||
Boost::system
|
||||
Boost::thread)
|
||||
|
||||
add_dependencies(serialization version)
|
||||
|
|
|
@ -26,19 +26,13 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
set(simplewallet_sources
|
||||
simplewallet.cpp)
|
||||
file(GLOB SW_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc
|
||||
*.h)
|
||||
|
||||
set(simplewallet_headers)
|
||||
|
||||
monero_find_all_headers(simplewallet_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
monero_private_headers(simplewallet
|
||||
${simplewallet_private_headers})
|
||||
monero_add_executable(simplewallet
|
||||
${simplewallet_sources}
|
||||
${simplewallet_headers}
|
||||
${simplewallet_private_headers})
|
||||
add_executable(simplewallet ${SW_SOURCES})
|
||||
target_link_libraries(simplewallet
|
||||
PRIVATE
|
||||
wallet
|
||||
|
@ -50,15 +44,21 @@ target_link_libraries(simplewallet
|
|||
${EPEE_READLINE}
|
||||
qrcodegen
|
||||
version
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_LOCALE_LIBRARY}
|
||||
|
||||
Boost::chrono
|
||||
Boost::program_options
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
Boost::thread
|
||||
Boost::serialization
|
||||
Boost::locale
|
||||
${ICU_LIBRARIES}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${GNU_READLINE_LIBRARY}
|
||||
${EXTRA_LIBRARIES})
|
||||
${GNU_READLINE_LIBRARY})
|
||||
|
||||
target_include_directories(simplewallet
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
set_property(TARGET simplewallet
|
||||
PROPERTY
|
||||
OUTPUT_NAME "wownero-wallet-cli")
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
# include (${PROJECT_SOURCE_DIR}/cmake/libutils.cmake)
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
# == wallet
|
||||
|
||||
set(wallet_sources
|
||||
add_library(wallet STATIC
|
||||
wallet2.cpp
|
||||
wallet_args.cpp
|
||||
ringdb.cpp
|
||||
|
@ -38,15 +38,14 @@ set(wallet_sources
|
|||
message_store.cpp
|
||||
message_transporter.cpp
|
||||
wallet_rpc_payments.cpp
|
||||
)
|
||||
|
||||
monero_find_all_headers(wallet_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
wallet2.h
|
||||
wallet_args.h
|
||||
ringdb.h
|
||||
node_rpc_proxy.h
|
||||
message_store.h
|
||||
message_transporter.h)
|
||||
|
||||
monero_private_headers(wallet
|
||||
${wallet_private_headers})
|
||||
monero_add_library(wallet
|
||||
${wallet_sources}
|
||||
${wallet_private_headers})
|
||||
target_link_libraries(wallet
|
||||
PUBLIC
|
||||
rpc_base
|
||||
|
@ -54,54 +53,77 @@ target_link_libraries(wallet
|
|||
common
|
||||
cryptonote_core
|
||||
mnemonics
|
||||
device_trezor
|
||||
net
|
||||
${LMDB_LIBRARY}
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_SERIALIZATION_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
Boost::chrono
|
||||
Boost::serialization
|
||||
Boost::filesystem
|
||||
Boost::system
|
||||
Boost::thread
|
||||
Boost::regex
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
${OPENSSL_LIBRARIES})
|
||||
|
||||
if(NOT IOS)
|
||||
set(wallet_rpc_sources
|
||||
wallet_rpc_server.cpp)
|
||||
target_include_directories(wallet
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/external/>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monero/>
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(wallet_rpc_headers)
|
||||
install(TARGETS wallet
|
||||
EXPORT walletTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
set(wallet_rpc_private_headers
|
||||
wallet_rpc_server.h)
|
||||
install(EXPORT walletTargets
|
||||
FILE walletTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
||||
monero_private_headers(wallet_rpc_server
|
||||
${wallet_rpc_private_headers})
|
||||
monero_add_executable(wallet_rpc_server
|
||||
${wallet_rpc_sources}
|
||||
${wallet_rpc_headers}
|
||||
${wallet_rpc_private_headers})
|
||||
# == rpc server
|
||||
|
||||
target_link_libraries(wallet_rpc_server
|
||||
PRIVATE
|
||||
wallet
|
||||
rpc_base
|
||||
cryptonote_core
|
||||
cncrypto
|
||||
common
|
||||
version
|
||||
daemonizer
|
||||
${EPEE_READLINE}
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${EXTRA_LIBRARIES})
|
||||
set_property(TARGET wallet_rpc_server
|
||||
PROPERTY
|
||||
OUTPUT_NAME "wownero-wallet-rpc")
|
||||
install(TARGETS wallet_rpc_server DESTINATION bin)
|
||||
endif()
|
||||
add_executable(wallet_rpc_server wallet_rpc_server.cpp)
|
||||
target_link_libraries(wallet_rpc_server
|
||||
PRIVATE
|
||||
wallet
|
||||
rpc_base
|
||||
cryptonote_core
|
||||
cncrypto
|
||||
common
|
||||
version
|
||||
daemonizer
|
||||
Boost::chrono
|
||||
Boost::program_options
|
||||
Boost::filesystem
|
||||
Boost::thread
|
||||
${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
target_include_directories(wallet_rpc_server
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/external/>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monero/>
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set_property(TARGET wallet_rpc_server PROPERTY OUTPUT_NAME "wownero-wallet-rpc")
|
||||
|
||||
install(TARGETS wallet_rpc_server
|
||||
EXPORT walletRpcServerTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(EXPORT walletRpcServerTargets
|
||||
FILE walletRpcServerTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
||||
add_subdirectory(api)
|
||||
|
|
|
@ -28,76 +28,49 @@
|
|||
|
||||
# include (${PROJECT_SOURCE_DIR}/cmake/libutils.cmake)
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
file(GLOB WALLET_API_HEADERS *.h)
|
||||
file(GLOB WALLET_API_SOURCES
|
||||
*.cpp
|
||||
*.c
|
||||
*.cc)
|
||||
|
||||
set(wallet_api_sources
|
||||
wallet.cpp
|
||||
wallet_manager.cpp
|
||||
transaction_info.cpp
|
||||
transaction_history.cpp
|
||||
transaction_construction_info.cpp
|
||||
pending_transaction_info.cpp
|
||||
pending_transaction.cpp
|
||||
utils.cpp
|
||||
address_book.cpp
|
||||
subaddress.cpp
|
||||
subaddress_account.cpp
|
||||
unsigned_transaction.cpp
|
||||
coins.cpp
|
||||
coins_info.cpp)
|
||||
add_library(wallet_api STATIC
|
||||
${WALLET_API_SOURCES}
|
||||
${WALLET_API_HEADERS})
|
||||
|
||||
set(wallet_api_headers
|
||||
wallet2_api.h)
|
||||
|
||||
set(wallet_api_private_headers
|
||||
wallet.h
|
||||
wallet_manager.h
|
||||
transaction_info.h
|
||||
transaction_history.h
|
||||
transaction_construction_info.h
|
||||
pending_transaction_info.h
|
||||
pending_transaction.h
|
||||
common_defines.h
|
||||
address_book.h
|
||||
subaddress.h
|
||||
subaddress_account.h
|
||||
unsigned_transaction.h
|
||||
coins.h
|
||||
coins_info.h)
|
||||
|
||||
monero_private_headers(wallet_api
|
||||
${wallet_api_private_headers})
|
||||
monero_add_library(wallet_api
|
||||
${wallet_api_sources}
|
||||
${wallet_api_headers}
|
||||
${wallet_api_private_headers})
|
||||
target_link_libraries(wallet_api
|
||||
PUBLIC
|
||||
wallet
|
||||
common
|
||||
cryptonote_core
|
||||
mnemonics
|
||||
${LMDB_LIBRARY}
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
${Boost_LOCALE_LIBRARY}
|
||||
${ICU_LIBRARIES}
|
||||
${Boost_SERIALIZATION_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
PRIVATE
|
||||
${EXTRA_LIBRARIES})
|
||||
lmdb
|
||||
Boost::chrono
|
||||
Boost::program_options
|
||||
Boost::filesystem
|
||||
Boost::thread
|
||||
Boost::locale
|
||||
Boost::serialization
|
||||
Boost::system
|
||||
Boost::regex
|
||||
${ICU_LIBRARIES})
|
||||
|
||||
target_include_directories(wallet_api
|
||||
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
set_property(TARGET wallet_api PROPERTY EXCLUDE_FROM_ALL TRUE)
|
||||
set_property(TARGET obj_wallet_api PROPERTY EXCLUDE_FROM_ALL TRUE)
|
||||
|
||||
if(IOS)
|
||||
set(lib_folder lib-${ARCH})
|
||||
else()
|
||||
set(lib_folder lib)
|
||||
endif()
|
||||
install(TARGETS wallet_api
|
||||
EXPORT walletApiTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/
|
||||
)
|
||||
|
||||
install(FILES ${wallet_api_headers}
|
||||
DESTINATION include/wallet/api)
|
||||
install(EXPORT walletApiTargets
|
||||
FILE walletApiTargets.cmake
|
||||
NAMESPACE monero::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/monero
|
||||
)
|
||||
|
|
|
@ -90,7 +90,6 @@ using namespace epee;
|
|||
#include "ringct/rctSigs.h"
|
||||
#include "ringdb.h"
|
||||
#include "device/device_cold.hpp"
|
||||
#include "device_trezor/device_trezor.hpp"
|
||||
#include "net/socks_connect.h"
|
||||
|
||||
extern "C"
|
||||
|
@ -8671,9 +8670,7 @@ crypto::chacha_key wallet2::get_ringdb_key()
|
|||
return *m_ringdb_key;
|
||||
}
|
||||
|
||||
void wallet2::register_devices(){
|
||||
hw::trezor::register_all();
|
||||
}
|
||||
void wallet2::register_devices(){}
|
||||
|
||||
hw::device& wallet2::lookup_device(const std::string & device_descriptor){
|
||||
if (!m_devices_registered){
|
||||
|
|
|
@ -530,6 +530,17 @@ namespace wallet_rpc
|
|||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
struct amounts_list
|
||||
{
|
||||
std::list<uint64_t> amounts;
|
||||
|
||||
bool operator==(const amounts_list& other) const { return amounts == other.amounts; }
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(amounts)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
struct single_transfer_response
|
||||
{
|
||||
std::string tx_hash;
|
||||
|
|
|
@ -52,7 +52,6 @@ target_link_libraries(trezor_tests
|
|||
version
|
||||
epee
|
||||
device
|
||||
device_trezor
|
||||
wallet
|
||||
wallet_api
|
||||
rpc
|
||||
|
|
Loading…
Reference in New Issue