Remove more Windows line endings

This commit is contained in:
Jacob 2024-01-21 02:28:30 +01:00
parent bda129148f
commit 09dcf84a82
32 changed files with 3460 additions and 3460 deletions

22
.gitignore vendored
View file

@ -1,11 +1,11 @@
.cache
examples/test.cpp
test
build
docs/html
docs/latex
docs/man
subprojects/*-*
subprojects/packagecache
packages
.vs/libleet
.cache
examples/test.cpp
test
build
docs/html
docs/latex
docs/man
subprojects/*-*
subprojects/packagecache
packages
.vs/libleet

322
README.md
View file

@ -1,161 +1,161 @@
# libleet
C++ Matrix client library which aims to support most features in the Matrix
specification, as well as Element features for a great user experience.
**This library is very much work in progress.**
Expect things to change, and as such it is not suitable for use
yet unless you feel like rewriting your code at a later date.
If you wish to help implement some of the many Matrix
features, feel free to do so in the form of a pull request.
It would be greatly appreciated :)
libleet is the library that powers the backend for the
work-in-progress Matrix client [stellar](https://git.speedie.site/speedie/stellar).
## Currently supports
- Connecting to a Matrix instance
- Logging in
- Message (including attachment) downloading
- Message sending
- Room creation
- Room upgrades
- Room listing (including those inside spaces)
- Space listing
- User listing
- Aliases
- Attachment uploading and downloading
- Discovery
- Refresh tokens
- Read marker
- User presence
- End to end encryption
- Can send encrypted text messages.
- Currently **cannot** send encrypted attachments, read encrypted messages,
verify interactively or use key backups.
- Reporting content
- VOIP
- Can retrieve TURN server credentials. Not much thought has been put into
VOIP support, because I am not a big fan of how it is implemented in Matrix.
- And more trivial features that I don't think are worth listing here.
## Not yet supported
- Managing rooms/spaces
- Creating spaces
- Storing custom data
- Device management
- Threads
- Third-party/Phone number/SSO authentication
- Various end-to-end encryption features
- Push notification endpoints
## Dependencies
- boost
- nlohmann\_json
- C++20 [compiler](https://en.cppreference.com/w/cpp/compiler_support/20)
- olm
- For end to end encryption, -DLEET\_NO\_ENCRYPTION to disable
- openssl
- For end to end encryption, -DLEET\_NO\_ENCRYPTION to disable
To install these dependencies on **Debian**:
- `apt install meson nlohmann-json3-dev libolm-dev libssl-dev libboost-dev`
- Note that libolm is not available from standard Debian bookworm repositories.
A meson wrap is included, which can be used if necessary.
To install these dependencies on **Arch**:
- `pacman -S meson nlohmann_json libolm openssl boost`
## Compiling with meson (Microsoft Windows/macOS/Linux/BSD)
You can compile libleet using the meson build system
on Windows, macOS, Linux and other Unix-like
operating systems.
You can do it like this:
- `meson setup build --prefix=/usr --reconfigure`
- `cd build`
- `meson install` as superuser.
If a dependency is not available, meson will fetch the source
code and attempt to build it to satisfy the dependency.
## Compiling with Visual Studio (Microsoft Windows)
To compile using Visual Studio 2022, you can open the solution file
and install the dependencies using nuget. All dependencies can be
installed this way, except for libolm.
To install libolm, you need to compile the CMake project manually.
You can do this by simply cloning [olm](https://gitlab.matrix.org/matrix-org/olm)
using Git. I recommend building a Release rather than a Debug build,
and I recommend that you statically link.
Then you can link with the resulting header files and the library
and then build libleet using msvc. You should end up with either
a dynamic library (.dll) or a static library (.lib)
## Use in projects
To use libleet in projects:
```cpp
/* Include libleet
* On Linux, the binary can be found in /usr/lib and the headers
* can be found in /usr/include/libleet.
* If you're using BSD or Windows, this may differ. You can use
* pkg-config to find the appropriate path and linker flag.
*/
#include <libleet/libleet.hpp>
```
If you need to use the URL parser externally, also include
libleet/net/Request.hpp.
Due to rather large dependencies, it is not recommended that you
statically link your program that depends on libleet. It's possible,
but not ideal in my opinion.
## Generating documentation
Doxygen is used project-wide for generating documentation.
To generate documentation: `cd docs; doxygen; cd ..`
## Design goals
- Fast
- Easy to use
- Cross-platform
- Make use of C++ features where appropriate, whilst not being too intimidating
- Support Element as well as possible
- Simplify Matrix API calls so that developers can just focus on
designing their user interface
## Features to implement
See the Issue tracker, as well as 'Not yet supported'.
## Examples
You can find examples in the examples subdirectory.
There are many examples that use different features
of the library. If you plan on writing a client, you should check
out `basic-chat-client` and perhaps `rest-api`.
You can build one of the examples using meson, in the same way
libleet is built.
## License
The project is licensed under the GNU Lesser General
Public License version 3.0, which means it is
free software as defined by the Free Software Foundation.
Copyright (c) 2023-2024 speedie (https://speedie.site)
# libleet
C++ Matrix client library which aims to support most features in the Matrix
specification, as well as Element features for a great user experience.
**This library is very much work in progress.**
Expect things to change, and as such it is not suitable for use
yet unless you feel like rewriting your code at a later date.
If you wish to help implement some of the many Matrix
features, feel free to do so in the form of a pull request.
It would be greatly appreciated :)
libleet is the library that powers the backend for the
work-in-progress Matrix client [stellar](https://git.speedie.site/speedie/stellar).
## Currently supports
- Connecting to a Matrix instance
- Logging in
- Message (including attachment) downloading
- Message sending
- Room creation
- Room upgrades
- Room listing (including those inside spaces)
- Space listing
- User listing
- Aliases
- Attachment uploading and downloading
- Discovery
- Refresh tokens
- Read marker
- User presence
- End to end encryption
- Can send encrypted text messages.
- Currently **cannot** send encrypted attachments, read encrypted messages,
verify interactively or use key backups.
- Reporting content
- VOIP
- Can retrieve TURN server credentials. Not much thought has been put into
VOIP support, because I am not a big fan of how it is implemented in Matrix.
- And more trivial features that I don't think are worth listing here.
## Not yet supported
- Managing rooms/spaces
- Creating spaces
- Storing custom data
- Device management
- Threads
- Third-party/Phone number/SSO authentication
- Various end-to-end encryption features
- Push notification endpoints
## Dependencies
- boost
- nlohmann\_json
- C++20 [compiler](https://en.cppreference.com/w/cpp/compiler_support/20)
- olm
- For end to end encryption, -DLEET\_NO\_ENCRYPTION to disable
- openssl
- For end to end encryption, -DLEET\_NO\_ENCRYPTION to disable
To install these dependencies on **Debian**:
- `apt install meson nlohmann-json3-dev libolm-dev libssl-dev libboost-dev`
- Note that libolm is not available from standard Debian bookworm repositories.
A meson wrap is included, which can be used if necessary.
To install these dependencies on **Arch**:
- `pacman -S meson nlohmann_json libolm openssl boost`
## Compiling with meson (Microsoft Windows/macOS/Linux/BSD)
You can compile libleet using the meson build system
on Windows, macOS, Linux and other Unix-like
operating systems.
You can do it like this:
- `meson setup build --prefix=/usr --reconfigure`
- `cd build`
- `meson install` as superuser.
If a dependency is not available, meson will fetch the source
code and attempt to build it to satisfy the dependency.
## Compiling with Visual Studio (Microsoft Windows)
To compile using Visual Studio 2022, you can open the solution file
and install the dependencies using nuget. All dependencies can be
installed this way, except for libolm.
To install libolm, you need to compile the CMake project manually.
You can do this by simply cloning [olm](https://gitlab.matrix.org/matrix-org/olm)
using Git. I recommend building a Release rather than a Debug build,
and I recommend that you statically link.
Then you can link with the resulting header files and the library
and then build libleet using msvc. You should end up with either
a dynamic library (.dll) or a static library (.lib)
## Use in projects
To use libleet in projects:
```cpp
/* Include libleet
* On Linux, the binary can be found in /usr/lib and the headers
* can be found in /usr/include/libleet.
* If you're using BSD or Windows, this may differ. You can use
* pkg-config to find the appropriate path and linker flag.
*/
#include <libleet/libleet.hpp>
```
If you need to use the URL parser externally, also include
libleet/net/Request.hpp.
Due to rather large dependencies, it is not recommended that you
statically link your program that depends on libleet. It's possible,
but not ideal in my opinion.
## Generating documentation
Doxygen is used project-wide for generating documentation.
To generate documentation: `cd docs; doxygen; cd ..`
## Design goals
- Fast
- Easy to use
- Cross-platform
- Make use of C++ features where appropriate, whilst not being too intimidating
- Support Element as well as possible
- Simplify Matrix API calls so that developers can just focus on
designing their user interface
## Features to implement
See the Issue tracker, as well as 'Not yet supported'.
## Examples
You can find examples in the examples subdirectory.
There are many examples that use different features
of the library. If you plan on writing a client, you should check
out `basic-chat-client` and perhaps `rest-api`.
You can build one of the examples using meson, in the same way
libleet is built.
## License
The project is licensed under the GNU Lesser General
Public License version 3.0, which means it is
free software as defined by the Free Software Foundation.
Copyright (c) 2023-2024 speedie (https://speedie.site)

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
basic-chat-program
subprojects/*-*
subprojects/packagecache
build
basic-chat-program

View file

@ -1,27 +1,27 @@
project(
'basic-chat-program',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'basic-chat-program.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'basic-chat-program',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'basic-chat-program.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
decode-mxc-url
subprojects/*-*
subprojects/packagecache
build
decode-mxc-url

View file

@ -1,27 +1,27 @@
project(
'decode-mxc-url',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'decode-mxc-url.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'decode-mxc-url',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'decode-mxc-url.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
download-mxc-url
subprojects/*-*
subprojects/packagecache
build
download-mxc-url

View file

@ -1,27 +1,27 @@
project(
'download-mxc-url',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'download-mxc-url.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'download-mxc-url',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'download-mxc-url.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
get-room-aliases
subprojects/*-*
subprojects/packagecache
build
get-room-aliases

View file

@ -1,27 +1,27 @@
project(
'get-room-aliases',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'get-room-aliases.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'get-room-aliases',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'get-room-aliases.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
get-url-preview
subprojects/*-*
subprojects/packagecache
build
get-url-preview

View file

@ -1,27 +1,27 @@
project(
'get-url-preview',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'get-url-preview.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'get-url-preview',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'get-url-preview.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
parse-url
subprojects/*-*
subprojects/packagecache
build
parse-url

View file

@ -1,27 +1,27 @@
project(
'parse-url',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'parse-url.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'parse-url',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'parse-url.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
post-image
subprojects/*-*
subprojects/packagecache
build
post-image

View file

@ -1,27 +1,27 @@
project(
'post-image',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'post-image.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'post-image',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'post-image.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
rest-api
subprojects/*-*
subprojects/packagecache
build
rest-api

View file

@ -1,29 +1,29 @@
project(
'rest-api',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'rest-api.cpp',
]
project_dependencies = [
dependency('nlohmann_json', fallback : 'nlohmann_json'),
dependency('boost'),
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'rest-api',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'rest-api.cpp',
]
project_dependencies = [
dependency('nlohmann_json', fallback : 'nlohmann_json'),
dependency('boost'),
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,13 +1,13 @@
[wrap-file]
directory = nlohmann_json-3.11.3
lead_directory_missing = true
source_url = https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip
source_filename = nlohmann_json-3.11.3.zip
source_hash = a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d
patch_url = https://wrapdb.mesonbuild.com/v1/projects/nlohmann_json/3.9.1/1/get_zip
patch_filename = nlohmann_json-3.9.1-1-wrap.zip
patch_hash = 1774e5506fbe3897d652f67e41973194b948d2ab851cf464a742f35f160a1435
[provide]
nlohmann_json = nlohmann_json_dep
[wrap-file]
directory = nlohmann_json-3.11.3
lead_directory_missing = true
source_url = https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip
source_filename = nlohmann_json-3.11.3.zip
source_hash = a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d
patch_url = https://wrapdb.mesonbuild.com/v1/projects/nlohmann_json/3.9.1/1/get_zip
patch_filename = nlohmann_json-3.9.1-1-wrap.zip
patch_hash = 1774e5506fbe3897d652f67e41973194b948d2ab851cf464a742f35f160a1435
[provide]
nlohmann_json = nlohmann_json_dep

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
return-encrypted-sessions
subprojects/*-*
subprojects/packagecache
build
return-encrypted-sessions

View file

@ -1,27 +1,27 @@
project(
'return-encrypted-sessions',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'return-encrypted-sessions.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'return-encrypted-sessions',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'return-encrypted-sessions.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
return-parsed-sync
subprojects/*-*
subprojects/packagecache
build
return-parsed-sync

View file

@ -1,27 +1,27 @@
project(
'return-parsed-sync',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'return-parsed-sync.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'return-parsed-sync',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'return-parsed-sync.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
return-supported-methods
subprojects/*-*
subprojects/packagecache
build
return-supported-methods

View file

@ -1,27 +1,27 @@
project(
'return-supported-methods',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'return-supported-methods.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'return-supported-methods',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'return-supported-methods.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,4 +1,4 @@
subprojects/*-*
subprojects/packagecache
build
return-sync
subprojects/*-*
subprojects/packagecache
build
return-sync

View file

@ -1,27 +1,27 @@
project(
'return-sync',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'return-sync.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)
project(
'return-sync',
'cpp',
version : '0.1',
default_options : ['warning_level=3']
)
project_source_files = [
'return-sync.cpp',
]
project_dependencies = [
dependency('libleet'),
]
build_args = [
'-DVERSION=' + meson.project_version(),
]
project_target = executable(
meson.project_name(),
project_source_files, install : true,
dependencies: project_dependencies,
c_args : build_args,
)
test(meson.project_name(), project_target)

View file

@ -1,38 +1,38 @@
project('libleet', 'cpp', version : '0.1.0', license : 'LGPL')
project_source_files = [
'src/libleet.cpp',
'src/net/Request.cpp',
'src/crypto/olm.cpp',
]
include_directories = [
include_directories('include'),
include_directories('include/net'),
include_directories('include/crypto'),
]
project_dependencies = [
dependency('nlohmann_json', fallback : 'nlohmann_json'),
dependency('openssl', fallback : 'openssl'),
dependency('boost'),
]
project_build_args = [
'-DLEET_VERSION=' + meson.project_version(),
]
if get_option('encryption')
project_dependencies += [ dependency('olm', fallback : 'olm') ]
else
project_build_args += [ '-DLEET_NO_ENCRYPTION=1' ]
endif
install_headers('include/libleet.hpp', subdir : 'libleet')
install_headers('include/net/Request.hpp', subdir : 'libleet/net')
install_headers('include/crypto/olm.hpp', subdir : 'libleet/crypto')
static_library('leet', project_source_files, dependencies : project_dependencies, install : true, include_directories : include_directories)
shared_library('leet', project_source_files, dependencies : project_dependencies, version : meson.project_version(), install : true, include_directories : include_directories)
import('pkgconfig').generate(libraries : '-lleet', subdirs : 'libleet', version : meson.project_version(), name : meson.project_name(), filebase : meson.project_name(), description : 'Matrix client library/SDK')
project('libleet', 'cpp', version : '0.1.0', license : 'LGPL')
project_source_files = [
'src/libleet.cpp',
'src/net/Request.cpp',
'src/crypto/olm.cpp',
]
include_directories = [
include_directories('include'),
include_directories('include/net'),
include_directories('include/crypto'),
]
project_dependencies = [
dependency('nlohmann_json', fallback : 'nlohmann_json'),
dependency('openssl', fallback : 'openssl'),
dependency('boost'),
]
project_build_args = [
'-DLEET_VERSION=' + meson.project_version(),
]
if get_option('encryption')
project_dependencies += [ dependency('olm', fallback : 'olm') ]
else
project_build_args += [ '-DLEET_NO_ENCRYPTION=1' ]
endif
install_headers('include/libleet.hpp', subdir : 'libleet')
install_headers('include/net/Request.hpp', subdir : 'libleet/net')
install_headers('include/crypto/olm.hpp', subdir : 'libleet/crypto')
static_library('leet', project_source_files, dependencies : project_dependencies, install : true, include_directories : include_directories)
shared_library('leet', project_source_files, dependencies : project_dependencies, version : meson.project_version(), install : true, include_directories : include_directories)
import('pkgconfig').generate(libraries : '-lleet', subdirs : 'libleet', version : meson.project_version(), name : meson.project_name(), filebase : meson.project_name(), description : 'Matrix client library/SDK')

View file

@ -1,13 +1,13 @@
[wrap-file]
directory = nlohmann_json-3.11.3
lead_directory_missing = true
source_url = https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip
source_filename = nlohmann_json-3.11.3.zip
source_hash = a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d
patch_url = https://wrapdb.mesonbuild.com/v1/projects/nlohmann_json/3.9.1/1/get_zip
patch_filename = nlohmann_json-3.9.1-1-wrap.zip
patch_hash = 1774e5506fbe3897d652f67e41973194b948d2ab851cf464a742f35f160a1435
[provide]
nlohmann_json = nlohmann_json_dep
[wrap-file]
directory = nlohmann_json-3.11.3
lead_directory_missing = true
source_url = https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip
source_filename = nlohmann_json-3.11.3.zip
source_hash = a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d
patch_url = https://wrapdb.mesonbuild.com/v1/projects/nlohmann_json/3.9.1/1/get_zip
patch_filename = nlohmann_json-3.9.1-1-wrap.zip
patch_hash = 1774e5506fbe3897d652f67e41973194b948d2ab851cf464a742f35f160a1435
[provide]
nlohmann_json = nlohmann_json_dep

View file

@ -1,10 +1,10 @@
[wrap-file]
directory = olm-3.2.16
method = cmake
source_url = https://gitlab.matrix.org/matrix-org/olm/-/archive/3.2.16/olm-3.2.16.tar.gz
source_filename = olm-3.2.16.tar.gz
source_hash = 1e90f9891009965fd064be747616da46b232086fe270b77605ec9bda34272a68
wrapdb_version = 3.2.16-1
[provide]
olm = olm_dep
[wrap-file]
directory = olm-3.2.16
method = cmake
source_url = https://gitlab.matrix.org/matrix-org/olm/-/archive/3.2.16/olm-3.2.16.tar.gz
source_filename = olm-3.2.16.tar.gz
source_hash = 1e90f9891009965fd064be747616da46b232086fe270b77605ec9bda34272a68
wrapdb_version = 3.2.16-1
[provide]
olm = olm_dep

View file

@ -1,15 +1,15 @@
[wrap-file]
directory = openssl-3.2.0
source_url = https://www.openssl.org/source/openssl-3.2.0.tar.gz
source_filename = openssl-3.2.0.tar.gz
source_hash = 14c826f07c7e433706fb5c69fa9e25dab95684844b4c962a2cf1bf183eb4690e
patch_filename = openssl_3.0.8-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-2/get_patch
patch_hash = e84b5fe469e681e3318184157a0c7c43d4cbacd078bb88f506e31569f8f75072
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-2/openssl-3.0.8.tar.gz
wrapdb_version = 3.2.0-2
[provide]
libcrypto = libcrypto_dep
libssl = libssl_dep
openssl = openssl_dep
[wrap-file]
directory = openssl-3.2.0
source_url = https://www.openssl.org/source/openssl-3.2.0.tar.gz
source_filename = openssl-3.2.0.tar.gz
source_hash = 14c826f07c7e433706fb5c69fa9e25dab95684844b4c962a2cf1bf183eb4690e
patch_filename = openssl_3.0.8-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-2/get_patch
patch_hash = e84b5fe469e681e3318184157a0c7c43d4cbacd078bb88f506e31569f8f75072
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-2/openssl-3.0.8.tar.gz
wrapdb_version = 3.2.0-2
[provide]
libcrypto = libcrypto_dep
libssl = libssl_dep
openssl = openssl_dep