From 4816a530e29cec7d9f4b099471137e93801fdd78 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Sun, 19 May 2024 11:19:36 +0200 Subject: [PATCH] lib --- CMakeLists.txt | 8 ++++++-- tcp/MyClient.cpp | 2 +- tcp/MyClient.h | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 95253e1..a98a227 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,11 @@ set(CMAKE_CXX_STANDARD 17) find_package( OpenCV REQUIRED ) find_package(PkgConfig REQUIRED) pkg_check_modules(LIBCAMERA REQUIRED libcamera) -pkg_check_modules(TCPSocket REQUIRED TCPSocket) + +find_package(Modelec COMPONENTS + TCPClient + REQUIRED +) include_directories(${LIBCAMERA_INCLUDE_DIRS} ${OPENCV_INCLUDE_DIRS}) @@ -46,7 +50,7 @@ add_executable(arucoDetector ${arucoDetectionSources}) target_link_libraries( arucoDetector -llccv ${OpenCV_LIBS} ) -target_link_libraries( arucoDetector TCPSocket ) +target_link_libraries( arucoDetector Modelec::TCPClient ) set(photo ${COMMON_SOURCES} diff --git a/tcp/MyClient.cpp b/tcp/MyClient.cpp index 198348f..6495639 100644 --- a/tcp/MyClient.cpp +++ b/tcp/MyClient.cpp @@ -9,7 +9,7 @@ void MyClient::handleMessage(const std::string& message) { std::cout << message << std::endl; - std::vector messageSplited = TCPSocket::split(message, ";"); + std::vector messageSplited = Modelec::split(message, ";"); if (messageSplited.size() != 4) { std::cerr << "Invalid message format" << std::endl; diff --git a/tcp/MyClient.h b/tcp/MyClient.h index 0c2ca37..2d324ac 100644 --- a/tcp/MyClient.h +++ b/tcp/MyClient.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include "../utils/utils.h" #include "../aruco/ArucoTag.h"