add helper to build module and install it.

This commit is contained in:
Lily Tsuru 2023-07-19 06:31:07 -04:00
parent fb29336ca7
commit a85a8ddc97
2 changed files with 4 additions and 2 deletions

View File

@ -34,6 +34,8 @@ garrysmod/addons/lcpu$ [[ ! -d '../../lua/bin']] && mkdir -p ../../lua/bin && cp
# Tada! # Tada!
``` ```
On Linux you can alternatively use the `./build_module.sh` script that will do all the build and installation steps automatically.
# Special Thanks # Special Thanks

View File

@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
# Build the LCPU addon for the reccomended environment # Build the LCPU addon for the reccomended environment
# and install it into the proper directory gmod wants native modules to be.
# This expects to be ran in [gmod]/addons/[addon folder].
set -x set -x
cmake -Wno-dev -GNinja -S native -B build -DCMAKE_BUILD_TYPE=Release cmake -Wno-dev -GNinja -S native -B build -DCMAKE_BUILD_TYPE=Release
ninja -C build ninja -C build