cmake_minimum_required(VERSION 2.8) set(CMAKE_CXX_STANDARD 11) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) project(ccats) add_executable(ccats src/main.cpp src/Sniffer.cpp src/Server.cpp src/base64.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} ${JSONCPP_INCLUDEDIR}) target_link_libraries(ccats PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES} ${TINS_LIBRARIES} ${PCAP_LIBRARIES} ${JSONCPP_LIBRARIES})