From 178014c9956ed15cf4ca92475385e1acbde1bf7d Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 29 Oct 2017 08:46:41 +0000 Subject: [PATCH] split off readline code into epee_readline --- contrib/epee/src/CMakeLists.txt | 17 ++++++++++++++--- src/daemon/CMakeLists.txt | 2 ++ src/simplewallet/CMakeLists.txt | 2 ++ src/wallet/CMakeLists.txt | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/contrib/epee/src/CMakeLists.txt b/contrib/epee/src/CMakeLists.txt index 3b41f415e..bd6714791 100644 --- a/contrib/epee/src/CMakeLists.txt +++ b/contrib/epee/src/CMakeLists.txt @@ -26,10 +26,9 @@ # 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. +add_library(epee STATIC hex.cpp http_auth.cpp mlog.cpp net_utils_base.cpp string_tools.cpp) if (USE_READLINE AND GNU_READLINE_FOUND) - add_library(epee STATIC hex.cpp http_auth.cpp mlog.cpp net_utils_base.cpp string_tools.cpp readline_buffer.cpp) -else() - add_library(epee STATIC hex.cpp http_auth.cpp mlog.cpp net_utils_base.cpp string_tools.cpp) + add_library(epee_readline STATIC readline_buffer.cpp) endif() # Build and install libepee if we're building for GUI @@ -41,6 +40,10 @@ if (BUILD_GUI_DEPS) 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() target_link_libraries(epee @@ -51,3 +54,11 @@ target_link_libraries(epee PRIVATE ${OPENSSL_LIBRARIES} ${EXTRA_LIBRARIES}) + +if (USE_READLINE AND GNU_READLINE_FOUND) + target_link_libraries(epee_readline + PUBLIC + easylogging + PRIVATE + ${Readline_LIBRARY}) +endif() diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index c6bdc6d83..5d9b6d38e 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -94,6 +94,8 @@ target_link_libraries(daemon daemonizer serialization daemon_rpc_server + epee + epee_readline version ${Boost_CHRONO_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} diff --git a/src/simplewallet/CMakeLists.txt b/src/simplewallet/CMakeLists.txt index baf55b0dc..861358efc 100644 --- a/src/simplewallet/CMakeLists.txt +++ b/src/simplewallet/CMakeLists.txt @@ -48,6 +48,8 @@ target_link_libraries(simplewallet cncrypto common mnemonics + epee + epee_readline version ${Boost_CHRONO_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt index 4c00a4d51..56f4a0497 100644 --- a/src/wallet/CMakeLists.txt +++ b/src/wallet/CMakeLists.txt @@ -108,6 +108,7 @@ if (NOT BUILD_GUI_DEPS) PRIVATE wallet epee + epee_readline rpc cryptonote_core cncrypto