编写CMakeLists编译pangu http
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
add_subdirectory(decrypt-mirroring)
|
add_subdirectory(decrypt-mirroring)
|
||||||
|
add_subdirectory(pangu-http)
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#include <pangu_logger.h>
|
||||||
|
|
||||||
#include <tfe_stream.h>
|
#include <tfe_stream.h>
|
||||||
#include <tfe_utils.h>
|
#include <tfe_utils.h>
|
||||||
#include <tfe_http.h>
|
#include <tfe_http.h>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include <tfe_utils.h>
|
#include <tfe_utils.h>
|
||||||
#include <cJSON.h>
|
#include <cjson/cJSON.h>
|
||||||
|
#include "pangu_logger.h"
|
||||||
|
|
||||||
#include <MESA/MESA_handle_logger.h>
|
#include <MESA/MESA_handle_logger.h>
|
||||||
#include <MESA/MESA_prof_load.h>
|
#include <MESA/MESA_prof_load.h>
|
||||||
@@ -7,6 +8,8 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -86,5 +86,5 @@ struct pangu_logger* logger;
|
|||||||
|
|
||||||
//return 0 if SUCCESS, otherwise return -1
|
//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);
|
int pangu_send_log(struct pangu_logger* logger, const pangu_log* log_msg, struct opt_unit* log_opt, int opt_num);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|||||||
13
vendor/CMakeLists.txt
vendored
13
vendor/CMakeLists.txt
vendored
@@ -163,3 +163,16 @@ file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
|
|||||||
add_library(cjson SHARED IMPORTED GLOBAL)
|
add_library(cjson SHARED IMPORTED GLOBAL)
|
||||||
set_property(TARGET cjson PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib64/libcjson.so)
|
set_property(TARGET cjson PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib64/libcjson.so)
|
||||||
set_property(TARGET cjson PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
|
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=<INSTALL_DIR>
|
||||||
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user