diff --git a/depend/third_libs.cmake b/depend/third_libs.cmake index 284cf67..71d7fb2 100644 --- a/depend/third_libs.cmake +++ b/depend/third_libs.cmake @@ -4,8 +4,9 @@ INCLUDE(FetchContent) PKG_SEARCH_MODULE(LIBCURL QUIET libcurl) PKG_SEARCH_MODULE(LIBSSL QUIET libssl) PKG_SEARCH_MODULE(LIBCRYPTO QUIET libcrypto) -PKG_SEARCH_MODULE(LIBZMQ QUIET libzmq) - +IF (USED_ZMQ) + PKG_SEARCH_MODULE(LIBZMQ QUIET libzmq) +ENDIF () IF ((NOT LIBZMQ_FOUND) OR (NOT LIBCRYPTO_FOUND) OR (NOT LIBSSL_FOUND) OR (NOT LIBCURL_FOUND)) LINUX_INSTALL_SYSTEM_PACKAGE() ENDIF () diff --git a/srcs/libs/cmdline/cmd_menu.c b/srcs/libs/cmdline/cmd_menu.c index 2984ebe..f57c451 100644 --- a/srcs/libs/cmdline/cmd_menu.c +++ b/srcs/libs/cmdline/cmd_menu.c @@ -186,8 +186,11 @@ static int on_cmd2(void *pTbl[], const char *pName, void *pInfo) { } pJsonStr = cJSON_PrintUnformatted(pJsonObj); - ret = mq_cmd_run(pSvr, pJsonStr); - +#ifdef ZEROMQ_ON + ret = mq_cmd_run(pSvr, pJsonStr); +#else + ret = ERR_SUCCESS; +#endif cJSON_Delete(pJsonObj); free((void *)pJsonStr); diff --git a/srcs/libs/cmdline/mq_cmd.c b/srcs/libs/mq/mq_cmd.c similarity index 100% rename from srcs/libs/cmdline/mq_cmd.c rename to srcs/libs/mq/mq_cmd.c