|
ASL
|
ASL is a collection of general purpose classes and utilities intended to be easy to use. It is mostly compatible with Windows, Linux, macOS and Android, 32 and 64 bits.
Operating system functionalities:
Utilities:
Basic data types:
ASL can be used as a static or as a dynamic/shared library. The easiest way to build and use it is via CMake (2.8.12 or later). By default both the dynamic and static libraries will be built. You can enable the ASL_USE_LOCAL8BIT option to disable interpretation of strings as UTF-8 and treat them as local 8- bit strings.
Just compile the library with whatever compilers and architecturs (32/64bit) you need. There is no need to install.
In order to use the library in another project just find the ASL package and link against one of the imported targets, asl for the dynamic version or asls for the static version. The static library is recommended as you don't need to copy or distribute a DLL at runtime.
There is no need to provide the library directory or set include_directories. find_package will find the library compatible with the current project among the versions compiled.
With CMake 3.14+, instead of using find_package(), you can download and build the library automatically as a subproject (and then link with it as before):
Remember that all header files have the asl/ prefix directory and are named like the class they define (case-sensitively), and that all symbols are in the asl namespace. So, for example, to use the Directory class:
HTTPS, TLS WebSockets and TlsSocket require the mbedTLS library (3.6.4+ or <=v3.2.1). Download and build the library, enable ASL_TLS in CMake and provide the mbedTLS install directory. On Windows you can use vcpkg install mbedtls.
On Ubuntu Linux you can just install package libmbedtls-dev with:
On FreeBSD use:
With a recent CMake (3.14+) you can also build mbedTLS together with ASL as subprojects (e.g. using FetchContent):
Then just link your project to asls after that block.