Skip to content

Commit

Permalink
adding threads dependency to meson file
Browse files Browse the repository at this point in the history
  • Loading branch information
noah1510 committed Dec 14, 2023
1 parent a8199c9 commit 03fc1ee
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,20 @@ cpp_headers = [
'algorithm',
'atomic',
'chrono',
'climits',
'filesystem',
'functional',
'future',
'iostream',
'climits',
'memory',
'ostream',
'regex',
'shared_mutex',
'sstream',
'string',
'string_view',
'tuple',
'vector',
'vector'
]

# The array containing all the sources that will be compiled
Expand Down Expand Up @@ -106,6 +109,9 @@ endif
# add the include directory, so that the compiler can find the header file
incdir = include_directories('include')

# now that async is used in the library, 'threads' is a required dependency
deps = [dependency('threads')]

# this defines the library that should be compiled and all its dependencies
rs232 = library(
'rs232',
Expand All @@ -114,13 +120,15 @@ rs232 = library(
soversion : '0',
include_directories : incdir,
link_args : extra_linker_args,
dependencies : deps,
install : true,
)

# this defines the compiled library as a dependency that can be used by other meson projects
rs232_dep = declare_dependency(
include_directories : incdir,
link_with : rs232,
dependencies : deps,
version : meson.project_version(),
)

Expand Down

0 comments on commit 03fc1ee

Please sign in to comment.