Browse Source

Compile with jsoncpp

anon 4 years ago
parent
commit
fa6e133037
2 changed files with 4 additions and 1 deletions
  1. 3 1
      daemon/CMakeLists.txt
  2. 1 0
      daemon/src/Server.cpp

+ 3 - 1
daemon/CMakeLists.txt

@@ -10,10 +10,12 @@ add_executable(ccats src/main.cpp src/Sniffer.cpp src/Server.cpp)
 # use pkg-config to fix building on debian unstable
 find_package(PkgConfig REQUIRED)
 pkg_check_modules(TINS REQUIRED libtins>=4.2 libpcap)
+pkg_check_modules(JSONCPP REQUIRED jsoncpp)
+
 
 find_package(Threads REQUIRED)
 find_package(Boost 1.67 REQUIRED COMPONENTS system)
 # find_package(libtins 4.2 REQUIRED)
 
 include_directories(${Boost_INCLUDE_DIR})
-target_link_libraries(ccats PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${TINS_LIBRARIES} ${PCAP_LIBRARIES})
+target_link_libraries(ccats PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${TINS_LIBRARIES} ${PCAP_LIBRARIES} ${JSONCPP_LIBRARIES})

+ 1 - 0
daemon/src/Server.cpp

@@ -1,5 +1,6 @@
 #include "../include/Server.h"
 #include <iostream>
+#include <jsoncpp/json/json.h>
 
 using namespace boost::asio;
 using ip::tcp;