Update CMake scripts

This commit is contained in:
Tindy X
2019-12-27 21:15:52 +08:00
parent b3fe174d13
commit fe9a4c06ad
4 changed files with 15 additions and 15 deletions

View File

@@ -14,7 +14,7 @@ cd ..
git clone https://github.com/jbeder/yaml-cpp
cd yaml-cpp
cmake . > /dev/null
cmake -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF . > /dev/null
make install -j4 > /dev/null
cd ..

View File

@@ -3,16 +3,16 @@ mkdir obj
set -xe
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c logger.cpp -o obj/logger.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c main.cpp -o obj/main.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c misc.cpp -o obj/misc.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c multithread.cpp -o obj/multithread.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c nodemanip.cpp -o obj/nodemanip.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c rapidjson_extra.cpp -o obj/rapidjson_extra.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c speedtestutil.cpp -o obj/speedtestutil.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c subexport.cpp -o obj/subexport.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c webget.cpp -o obj/webget.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c webserver_libevent.cpp -o obj/webserver_libevent.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/logger.cpp -o obj/logger.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/main.cpp -o obj/main.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/misc.cpp -o obj/misc.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/multithread.cpp -o obj/multithread.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/nodemanip.cpp -o obj/nodemanip.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/rapidjson_extra.cpp -o obj/rapidjson_extra.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/speedtestutil.cpp -o obj/speedtestutil.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/subexport.cpp -o obj/subexport.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/webget.cpp -o obj/webget.o
c++ -std=c++17 -D_MACOS -Wall -fexceptions -c src/webserver_libevent.cpp -o obj/webserver_libevent.o
c++ -o subconverter obj/logger.o obj/main.o obj/misc.o obj/multithread.o obj/nodemanip.o obj/rapidjson_extra.o obj/speedtestutil.o obj/subexport.o obj/webget.o obj/webserver_libevent.o -lpcrecpp -lpcre -levent -lpthread -lyaml-cpp -lcurl -lssl -lcrypto -lz -O3 -s
chmod +x subconverter

View File

@@ -2,12 +2,12 @@
set -xe
apt update
apt install git cmake clang pkg-config
apt install libevent libcurl openssl pcre
apt install -y git cmake clang pkg-config
apt install -y libevent libcurl openssl pcre
git clone https://github.com/jbeder/yaml-cpp
cd yaml-cpp
cmake -DCMAKE_INSTALL_PREFIX=/data/data/com.termux/files/usr .
cmake -DCMAKE_INSTALL_PREFIX=/data/data/com.termux/files/usr -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF .
make install -j3
cd ..