diff --git a/plugin/business/CMakeLists.txt b/plugin/business/CMakeLists.txt index 9edb67c..03542d6 100644 --- a/plugin/business/CMakeLists.txt +++ b/plugin/business/CMakeLists.txt @@ -1 +1,2 @@ add_subdirectory(decrypt-mirroring) +add_subdirectory(pangu-http) \ No newline at end of file diff --git a/plugin/business/pangu-http/pangu_http.cpp b/plugin/business/pangu-http/pangu_http.cpp index 1c15538..6302aed 100644 --- a/plugin/business/pangu-http/pangu_http.cpp +++ b/plugin/business/pangu-http/pangu_http.cpp @@ -1,3 +1,5 @@ +#include + #include #include #include diff --git a/plugin/business/pangu-http/pangu_logger.cpp b/plugin/business/pangu-http/pangu_logger.cpp index c56d867..aa7e565 100644 --- a/plugin/business/pangu-http/pangu_logger.cpp +++ b/plugin/business/pangu-http/pangu_logger.cpp @@ -1,5 +1,6 @@ #include -#include +#include +#include "pangu_logger.h" #include #include @@ -7,6 +8,8 @@ #include #include #include +#include +#include diff --git a/plugin/business/pangu-http/pangu_logger.h b/plugin/business/pangu-http/pangu_logger.h index 45464a3..d8cfc7f 100644 --- a/plugin/business/pangu-http/pangu_logger.h +++ b/plugin/business/pangu-http/pangu_logger.h @@ -86,5 +86,5 @@ struct pangu_logger* logger; //return 0 if SUCCESS, otherwise return -1 int pangu_send_log(struct pangu_logger* logger, const pangu_log* log_msg, struct opt_unit* log_opt, int opt_num); -#endif + diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 7c7f2e0..8eb8664 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -163,3 +163,16 @@ file(MAKE_DIRECTORY ${INSTALL_DIR}/include) add_library(cjson SHARED IMPORTED GLOBAL) set_property(TARGET cjson PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib64/libcjson.so) set_property(TARGET cjson PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include) + +### librdkafka +ExternalProject_Add(librdkafka PREFIX librdkafka + URL ${CMAKE_CURRENT_SOURCE_DIR}/librdkafka-0.11.5.tar.gz + URL_MD5 90bb43499252317ae55723d32ccacf18 + CONFIGURE_COMMAND ./configure --prefix= + BUILD_IN_SOURCE 1) +ExternalProject_Get_Property(librdkafka INSTALL_DIR) +file(MAKE_DIRECTORY ${INSTALL_DIR}/include) + +add_library(librdkafka-static STATIC IMPORTED GLOBAL) +set_property(TARGET librdkafka-static PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/librdkafka.a) +set_property(TARGET librdkafka-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)