aboutsummaryrefslogtreecommitdiff
path: root/client/libacron/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'client/libacron/README.md')
-rw-r--r--client/libacron/README.md34
1 files changed, 17 insertions, 17 deletions
diff --git a/client/libacron/README.md b/client/libacron/README.md
index 4514e21..5fba5c6 100644
--- a/client/libacron/README.md
+++ b/client/libacron/README.md
@@ -9,7 +9,7 @@ Requirements:
* `json-c` installed and using PkgConfig
* Git
-* CMake
+* Meson
* A C11 or higher C compiler
* Connectivity to this git repository and `github.com`
@@ -20,11 +20,10 @@ git clone https://git.yuuta.moe/Minecraft/acron.git
cd acron
git submodule update --init
cd client/libacron/
-mkdir build
+meson build -Dbuildtype=release
cd build
-cmake -DCMAKE_BUILD_TYPE=Release ..
-cmake --build .
-DESTDIR=$(pwd)/install cmake --install .
+ninja
+DESTDIR=$(pwd)/install meson install
```
The shared library will be at `libac.so` (`ac.dll` on Windows). The static library will be at `libac-static.a` (`ac-static.lib` on Windows).
@@ -33,18 +32,6 @@ The distributable headers are at `install/usr/local/include/libac/`.
To make debug builds, use the Debug build type. Debug builds will have ASAN enabled.
-To build on Windows:
-
-```batch
-git clone https://git.yuuta.moe/Minecraft/acron.git
-CD acron
-git submodule update --init
-CD client/libacron/
-setup.bat
-mkdir build
-cmake -DCMAKE_BUILD_TYPE=Release ..
-cmake --build .
-```
## Usage
@@ -264,6 +251,19 @@ connection-related functions from any threads.
Example `apps/helloworld/main.c` has a naive cross-platform example of how to guard the connection using
a mutex.
+## Development
+
+To make development builds, use the following `meson(1)` command:
+
+```shell
+CC=cc meson build -Dsanitize=address
+```
+
+1. If you have `ccache` installed, you need to manually specify a C compiler to NOT use ccache, as CLion does not recognize ccache.
+2. Use `-Dsanitize` to enable ASAN.
+
+To open in CLion, refer to [https://blog.jetbrains.com/clion/2021/01/working-with-meson-in-clion-using-compilation-db](https://blog.jetbrains.com/clion/2021/01/working-with-meson-in-clion-using-compilation-db/). Be warned that CLion support is still primitive.
+
## Roadmap
* Make unit tests