Skip to content

Commit 385c011

Browse files
committed
chore: run treefmt
1 parent 5148be9 commit 385c011

File tree

2 files changed

+23
-27
lines changed

2 files changed

+23
-27
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix
3232
> must enable the experimental "flakes" and "nix-command" features.
3333
3434
2. Build the program
35-
``` bash
35+
36+
```bash
3637
nix build
3738
```
3839

3940
3. Run the program
41+
4042
```bash
4143
result/bin/WebSocketWithOpenCV
4244
```
@@ -106,7 +108,7 @@ This will produce the `WebSocketWithOpenCV` binary.
106108
> due to some quirks with the Nix environment.
107109
>
108110
> Additionally, you should `exit` the `nix develop` shell and re-run `nix
109-
> develop --impure` if you modify any `nix` files.
111+
develop --impure` if you modify any `nix` files.
110112

111113
## Solution without package managers, only Meson
112114

@@ -136,17 +138,20 @@ Using this approach, you will have to manually provide the dependencies above,
136138
placing them somewhere that `pkg-config` or `CMake` or `Meson` can find them.
137139

138140
1. **Clone the Repository**
141+
139142
```bash
140143
git clone <repository-url>
141144
cd WebSocketWithOpenCV
142145

143-
2. **Install dependencies** *If you already have dependencies on your computer*
146+
```
147+
148+
2. **Install dependencies** _If you already have dependencies on your computer_
144149
I still recommend you to have a libs folder that includes the cloned version
145150
of all the required dependencies(Both headers and the compiled code). It is
146151
then set up in the CmakeList to then find it relative to your project
147152
directory. If you don't then it still works, I'll made it so cmake accounts
148-
for that!
153+
for that!
149154

150155
3. **Build and server**
151-
(1) `meson setup build && cd build`
152-
(2) `ninja`
156+
(1) `meson setup build && cd build`
157+
(2) `ninja`

meson.build

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
project(
2-
'WebSocketWithOpenCV',
3-
'cpp',
4-
version: '0.1',
5-
default_options: ['cpp_std=c++17', 'b_pie=true'],
2+
'WebSocketWithOpenCV',
3+
'cpp',
4+
version: '0.1',
5+
default_options: ['cpp_std=c++17', 'b_pie=true'],
66
)
77

88
# Include directories
@@ -11,7 +11,7 @@ inc_dirs = include_directories('include', 'include/openCV_f', 'protos')
1111
# Dependencies
1212
opencv_dep = dependency('opencv4', method: 'auto', required: false)
1313
if not opencv_dep.found()
14-
opencv_dep = dependency('opencv', method: 'auto', required: true)
14+
opencv_dep = dependency('opencv', method: 'auto', required: true)
1515
endif
1616

1717
boost_dep = dependency('boost', method: 'auto', required: true)
@@ -21,29 +21,20 @@ protobuf_dep = dependency('protobuf', method: 'auto', required: true)
2121

2222
# Add source files
2323
sources = [
24-
'src/websocket_s/websocket_server.cpp',
25-
'src/openCV_s/process_image.cpp',
24+
'src/websocket_s/websocket_server.cpp',
25+
'src/openCV_s/process_image.cpp',
2626
]
2727

2828
# Add proto-generated files
29-
proto_sources = [
30-
'protos/message.pb.cc',
31-
'protos/message.grpc.pb.cc',
32-
]
29+
proto_sources = ['protos/message.pb.cc', 'protos/message.grpc.pb.cc']
3330

3431
# Add all sources together
3532
all_sources = sources + proto_sources
3633

3734
# Create executable target
3835
executable(
39-
'WebSocketWithOpenCV',
40-
all_sources,
41-
include_directories: inc_dirs,
42-
dependencies: [
43-
boost_dep,
44-
opencv_dep,
45-
torch_dep,
46-
grpc_dep,
47-
protobuf_dep,
48-
],
36+
'WebSocketWithOpenCV',
37+
all_sources,
38+
include_directories: inc_dirs,
39+
dependencies: [boost_dep, opencv_dep, torch_dep, grpc_dep, protobuf_dep],
4940
)

0 commit comments

Comments
 (0)