Skip to content

Commit

Permalink
Statically link discord-rpc lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Kesefon committed Oct 31, 2020
1 parent 15b97a6 commit a3678cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/build-linux.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#! /bin/sh
rm libs/ discord-rpc/build/
rm libs/ discord-rpc/build/ -r
cd discord-rpc/
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../../libs -DUSE_STATIC_CRT=ON -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_C_FLAGS=-m32
cmake .. -DCMAKE_INSTALL_PREFIX=../../libs -DUSE_STATIC_CRT=ON -DBUILD_EXAMPLES=OFF -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_C_FLAGS=-m32
cmake --build . --config Release --target install
cd ../../
g++ -m32 -fPIC GRPCTest.cpp -shared -o gmcl_fluffydiscord_linux.dll -Igmod-module-base/include/GarrysMod/Lua -Ilibs/include -Llibs/lib64 -ldiscord-rpc -fpermissive
g++ -m32 -fPIC GRPCTest.cpp libs/lib/libdiscord-rpc.a -shared -o gmcl_fluffydiscord_linux.dll -Igmod-module-base/include/GarrysMod/Lua -Ilibs/include -fpermissive

0 comments on commit a3678cd

Please sign in to comment.