[deps] added opencv and stdexec
opencv would be used to compile actual processing part stdexec would be used for RPC module :) TG-8 #in-progress
This commit is contained in:
parent
603646c230
commit
9cb3f009ea
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,4 +7,6 @@ subprojects/nlohmann_json/
|
||||
subprojects/packagecache/
|
||||
subprojects/yaml-cpp-0.8.0
|
||||
subprojects/base64-0.5.2/
|
||||
subprojects/stdexec/
|
||||
subprojects/.*
|
||||
.venv/
|
||||
|
||||
20
include/cloud_point/image.h
Normal file
20
include/cloud_point/image.h
Normal file
@ -0,0 +1,20 @@
|
||||
//
|
||||
// Created by vptyp on 11.03.2026.
|
||||
//
|
||||
#pragma once
|
||||
#include <opencv4/opencv2/opencv.hpp>
|
||||
namespace score {
|
||||
|
||||
class Image {
|
||||
public:
|
||||
Image();
|
||||
explicit Image(cv::Mat&& image);
|
||||
~Image();
|
||||
|
||||
cv::Mat get() const;
|
||||
|
||||
protected:
|
||||
cv::Mat data_;
|
||||
};
|
||||
|
||||
}
|
||||
@ -3,6 +3,7 @@ project('cloud_point_rpc', 'cpp',
|
||||
default_options : ['warning_level=3', 'cpp_std=c++20'])
|
||||
|
||||
# Dependencies
|
||||
stdexec_dep = dependency('stdexec', fallback: ['stdexec', 'stdexec_dep'])
|
||||
json_dep = dependency('nlohmann_json', fallback : ['nlohmann_json', 'nlohmann_json_dep'])
|
||||
thread_dep = dependency('threads')
|
||||
asio_dep = dependency('asio', fallback : ['asio', 'asio_dep'])
|
||||
|
||||
22
src/cloud_point/image.cpp
Normal file
22
src/cloud_point/image.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by vptyp on 12.03.2026.
|
||||
//
|
||||
#include "cloud_point/image.h"
|
||||
|
||||
namespace score {
|
||||
|
||||
Image::Image() {
|
||||
//no work
|
||||
}
|
||||
|
||||
Image::Image(cv::Mat&& image) {
|
||||
this->data_ = std::move(image);
|
||||
}
|
||||
|
||||
Image::~Image() = default;
|
||||
|
||||
cv::Mat Image::get() const {
|
||||
return this->data_;
|
||||
}
|
||||
|
||||
}
|
||||
27
src/cloud_point/meson.build
Normal file
27
src/cloud_point/meson.build
Normal file
@ -0,0 +1,27 @@
|
||||
opencv_dep = dependency('opencv4',
|
||||
fallback: ['libopencv', 'libopencv4'],
|
||||
required: false)
|
||||
|
||||
if not opencv_dep.found()
|
||||
message('\'opencv\' was not found. Try install libopencv-dev or similar package on your system')
|
||||
message('cloud_point_compute library removed from compilation')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
cloud_point_sources = files(
|
||||
'image.cpp'
|
||||
)
|
||||
|
||||
cpc_deps = [ cloud_point_rpc_dep, opencv_dep ]
|
||||
|
||||
cloud_point_compute_lib = shared_library('cloud_point_compute',
|
||||
sources: cloud_point_sources,
|
||||
include_directories: inc,
|
||||
dependencies: cpc_deps,
|
||||
)
|
||||
|
||||
cloud_point_compute_dep = declare_dependency(
|
||||
include_directories: inc,
|
||||
link_with: cloud_point_compute_lib,
|
||||
dependencies: cpc_deps
|
||||
)
|
||||
@ -7,16 +7,18 @@ cloud_point_rpc_sources = files(
|
||||
'rpc_coder.cpp'
|
||||
)
|
||||
|
||||
deps = [json_dep, thread_dep, glog_dep, yaml_dep, asio_dep, base64_dep]
|
||||
|
||||
libcloud_point_rpc = shared_library('cloud_point_rpc',
|
||||
cloud_point_rpc_sources,
|
||||
include_directories : inc,
|
||||
dependencies : [json_dep, thread_dep, glog_dep, yaml_dep, asio_dep, base64_dep],
|
||||
dependencies : deps,
|
||||
install : true)
|
||||
|
||||
cloud_point_rpc_dep = declare_dependency(
|
||||
include_directories : inc,
|
||||
link_with : libcloud_point_rpc,
|
||||
dependencies : [json_dep, glog_dep, yaml_dep, asio_dep, base64_dep])
|
||||
dependencies : deps)
|
||||
|
||||
# Test lib
|
||||
libcloud_point_rpc_test = shared_library('test_cloud_point',
|
||||
@ -54,3 +56,5 @@ executable('cloud_point_rpc_server',
|
||||
dependencies : cloud_point_rpc_dep,
|
||||
link_args : '-pthread',
|
||||
install : true)
|
||||
|
||||
subdir('cloud_point')
|
||||
@ -11,7 +11,7 @@ Base64RPCCoder::Base64RPCCoder() = default;
|
||||
Base64RPCCoder::~Base64RPCCoder() = default;
|
||||
|
||||
/**
|
||||
* Tries to decode ASCII complained string to the
|
||||
* Tries to decode ASCII complained string to the raw bytes
|
||||
* @param encoded ASCII complained base64 encoded string
|
||||
* @return vector of raw bytes << allocated on encoded.size() / 4 * 3 + 1 size
|
||||
*/
|
||||
|
||||
7
subprojects/stdexec.wrap
Normal file
7
subprojects/stdexec.wrap
Normal file
@ -0,0 +1,7 @@
|
||||
[wrap-git]
|
||||
url = https://github.com/NVIDIA/stdexec.git
|
||||
revision = gtc-2026
|
||||
depth = 1
|
||||
|
||||
[provide]
|
||||
stdexec = stdexec_dep
|
||||
Loading…
x
Reference in New Issue
Block a user