2017-04-18 05:10:09 +00:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# CMake helper for the majority of the cpp-ethereum modules.
|
|
|
|
#
|
|
|
|
# This module defines
|
|
|
|
# Monero_XXX_LIBRARIES, the libraries needed to use ethereum.
|
|
|
|
# Monero_FOUND, If false, do not try to use ethereum.
|
|
|
|
#
|
|
|
|
# File addetped from cpp-ethereum
|
|
|
|
#
|
|
|
|
# The documentation for cpp-ethereum is hosted at http://cpp-ethereum.org
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# This file is part of cpp-ethereum.
|
|
|
|
#
|
|
|
|
# cpp-ethereum is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# cpp-ethereum is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
#
|
|
|
|
# (c) 2014-2016 cpp-ethereum contributors.
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
2018-03-27 11:23:21 +00:00
|
|
|
set(LIBS common;blocks;cryptonote_basic;cryptonote_core;multisig;
|
2018-03-05 00:07:27 +00:00
|
|
|
cryptonote_protocol;daemonizer;mnemonics;epee;lmdb;device;
|
2019-05-19 04:26:53 +00:00
|
|
|
blockchain_db;ringct;wallet;cncrypto;easylogging;version;
|
|
|
|
checkpoints;randomx)
|
2017-04-18 05:10:09 +00:00
|
|
|
|
|
|
|
set(Xmr_INCLUDE_DIRS "${CPP_MONERO_DIR}")
|
|
|
|
|
|
|
|
# if the project is a subset of main cpp-ethereum project
|
|
|
|
# use same pattern for variables as Boost uses
|
|
|
|
|
|
|
|
foreach (l ${LIBS})
|
|
|
|
|
|
|
|
string(TOUPPER ${l} L)
|
|
|
|
|
|
|
|
find_library(Xmr_${L}_LIBRARY
|
|
|
|
NAMES ${l}
|
|
|
|
PATHS ${CMAKE_LIBRARY_PATH}
|
2019-05-19 04:26:53 +00:00
|
|
|
PATH_SUFFIXES "/src/${l}" "/src/" "/external/db_drivers/lib${l}" "/lib" "/src/crypto" "/contrib/epee/src" "/external/easylogging++/" "/external/${l}"
|
2017-04-18 05:10:09 +00:00
|
|
|
NO_DEFAULT_PATH
|
|
|
|
)
|
|
|
|
|
|
|
|
set(Xmr_${L}_LIBRARIES ${Xmr_${L}_LIBRARY})
|
|
|
|
|
|
|
|
message(STATUS FindMonero " Xmr_${L}_LIBRARIES ${Xmr_${L}_LIBRARY}")
|
|
|
|
|
|
|
|
add_library(${l} STATIC IMPORTED)
|
|
|
|
set_property(TARGET ${l} PROPERTY IMPORTED_LOCATION ${Xmr_${L}_LIBRARIES})
|
|
|
|
|
|
|
|
endforeach()
|
|
|
|
|
2018-03-15 01:44:43 +00:00
|
|
|
if (EXISTS ${MONERO_BUILD_DIR}/src/ringct/libringct_basic.a)
|
|
|
|
message(STATUS FindMonero " found libringct_basic.a")
|
|
|
|
add_library(ringct_basic STATIC IMPORTED)
|
|
|
|
set_property(TARGET ringct_basic
|
|
|
|
PROPERTY IMPORTED_LOCATION ${MONERO_BUILD_DIR}/src/ringct/libringct_basic.a)
|
|
|
|
endif()
|
2018-03-09 00:36:21 +00:00
|
|
|
|
2017-04-18 05:10:09 +00:00
|
|
|
|
|
|
|
message(STATUS ${MONERO_SOURCE_DIR}/build)
|
|
|
|
|
|
|
|
# include monero headers
|
|
|
|
include_directories(
|
|
|
|
${MONERO_SOURCE_DIR}/src
|
|
|
|
${MONERO_SOURCE_DIR}/external
|
2019-05-25 04:46:50 +00:00
|
|
|
${MONERO_SOURCE_DIR}/external/randomx/src
|
2017-04-18 05:10:09 +00:00
|
|
|
${MONERO_SOURCE_DIR}/build
|
|
|
|
${MONERO_SOURCE_DIR}/external/easylogging++
|
|
|
|
${MONERO_SOURCE_DIR}/contrib/epee/include
|
2019-05-19 04:26:53 +00:00
|
|
|
${MONERO_SOURCE_DIR}/external/db_drivers/liblmdb)
|