diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cc9eb89c..c6a291f6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,6 +205,7 @@ if (WITH_HTTPD AND MHD_FOUND) set(HTTPD_SOURCES src/api/Httpd.h src/api/Httpd.cpp) else() add_definitions(/DXMRIG_NO_HTTPD) + add_definitions(/DXMRIG_NO_API) endif() include_directories(src) diff --git a/src/Summary.cpp b/src/Summary.cpp index b7376b8e7..c6c533419 100644 --- a/src/Summary.cpp +++ b/src/Summary.cpp @@ -127,6 +127,18 @@ static void print_pools() } +#ifndef XMRIG_NO_API +static void print_api() +{ + if (Options::i()->apiPort() == 0) { + return; + } + + Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mAPI PORT: \x1B[01;36m%d" : " * API PORT: %d", Options::i()->apiPort()); +} +#endif + + static void print_commands() { if (Options::i()->colors()) { @@ -145,6 +157,11 @@ void Summary::print() print_cpu(); print_threads(); print_pools(); + +# ifndef XMRIG_NO_API + print_api(); +# endif + print_commands(); }