summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryangwei <[email protected]>2019-04-11 12:32:47 +0800
committeryangwei <[email protected]>2019-04-11 12:32:47 +0800
commite9f08f261c10664a8c5483d0c7eab0edf4451ca6 (patch)
treef8c997668536593e7c85fa0ac5f9db22d57abf4b
parent39493badab924847044e3cd823872a79fc287aab (diff)
增加cmakelist
-rw-r--r--.gitignore15
-rw-r--r--CMakeLists.txt28
-rw-r--r--conf/ntc_http_collect.inf12
-rw-r--r--src/ntc_http_collect.cpp (renamed from src/ntc_http_collect.c)2
4 files changed, 49 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 267ab48..a65025a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,11 @@
SI/
-*.I*
-*.P*
-*.S*
-*.W*
-*.[od]
-*.[1-9]*
*.log
+*.o
+*.so
+*.si4project/
+*.a
+*.d
+build/
+.vscode
+.idea
+core.*
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..c6a42aa
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required (VERSION 2.8)
+project (ntc_http_collect)
+
+#set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+#include(Version)
+
+set(CMAKE_MACOSX_RPATH 0)
+
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wall)
+
+include_directories(${PROJECT_SOURCE_DIR}/inc/)
+include_directories(/opt/MESA/include/)
+include_directories(/opt/MESA/include/MESA)
+
+file(GLOB SRC
+ "src/*.c"
+ "src/*.cpp"
+)
+
+set(DEPEND_DYN_LIB MESA_handle_logger MESA_prof_load MESA_htable MESA_field_stat2)
+
+
+# Shared Library Output
+add_library(ntc_http_collect SHARED ${SRC})
+target_link_libraries(ntc_http_collect ${DEPEND_DYN_LIB})
+set_target_properties(ntc_http_collect PROPERTIES PREFIX "")
+
+install(TARGETS ntc_http_collect DESTINATION ${CMAKE_SOURCE_DIR}/bin)
diff --git a/conf/ntc_http_collect.inf b/conf/ntc_http_collect.inf
new file mode 100644
index 0000000..e1d7211
--- /dev/null
+++ b/conf/ntc_http_collect.inf
@@ -0,0 +1,12 @@
+[PLUGINFO]
+PLUGNAME=ntc_http_collect
+SO_PATH=./plug/business/ntc_http_collect/ntc_http_collect.so
+INIT_FUNC=NTC_HTTP_COLLECT_INIT
+DESTROY_FUNC=NTC_HTTP_COLLECT_DESTROY
+
+[HTTP]
+FUNC_FLAG=HTTP_MESSAGE_URL,HTTP_STATE,HTTP_REFERER
+FUNC_NAME=NTC_HTTP_COLLECT_ENTRY
+
+
+
diff --git a/src/ntc_http_collect.c b/src/ntc_http_collect.cpp
index 7639cd2..6fa6ba1 100644
--- a/src/ntc_http_collect.c
+++ b/src/ntc_http_collect.cpp
@@ -28,8 +28,6 @@
#include "MESA_htable.h"
#include "field_stat2.h"
#include "rdkafka.h"
-#include "wired_cfg.h"
-