mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 19:00:22 +08:00
Add build parameter for homemade backend
This commit is contained in:
parent
2f4f70a165
commit
c8e47c304a
2
.github/workflows/build-push.yml
vendored
2
.github/workflows/build-push.yml
vendored
@ -138,7 +138,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
qmake .. CONFIG+=no_increase_build_number PREFIX=/usr
|
||||
qmake .. CONFIG+=no_increase_build_number PREFIX=/usr with_backend
|
||||
- name: Building Qv2ray
|
||||
run: |
|
||||
cd build
|
||||
|
25
Qv2ray.pro
25
Qv2ray.pro
@ -153,6 +153,9 @@ message(" ")
|
||||
RC_ICONS += ./assets/icons/qv2ray.ico
|
||||
ICON = ./assets/icons/qv2ray.icns
|
||||
|
||||
contains( CONFIG, with_backend ) {
|
||||
message("Compiling Qv2ray with custom backend")
|
||||
} else {
|
||||
# ------------------------------------------ Begin checking gRPC and protobuf headers.
|
||||
!exists(libs/gen/v2ray_api_commands.grpc.pb.h) || !exists(libs/gen/v2ray_api_commands.grpc.pb.cc) || !exists(libs/gen/v2ray_api_commands.pb.h) || !exists(libs/gen/v2ray_api_commands.pb.cc) {
|
||||
message(" ")
|
||||
@ -168,6 +171,8 @@ ICON = ./assets/icons/qv2ray.icns
|
||||
error("! ABORTING THE BUILD !")
|
||||
message(" ")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------ Begin to detect language files.
|
||||
message("Looking for language support.")
|
||||
@ -245,9 +250,6 @@ macx {
|
||||
|
||||
message(" --> Linking libgpr and libupb.")
|
||||
LIBS += -lgpr -lupb
|
||||
|
||||
message(" --> Linking libqvb static library.")
|
||||
LIBS += -L$$PWD/libs/ -lqvb-darwin
|
||||
}
|
||||
|
||||
# Reuse unix for macx as well
|
||||
@ -258,8 +260,6 @@ unix {
|
||||
message(" --> Linking against gRPC and protobuf library.")
|
||||
LIBS += -L/usr/local/lib -lgrpc++ -lprotobuf -lgrpc
|
||||
|
||||
message(" --> Linking libqvb static library.")
|
||||
unix:!macx: LIBS += -L$$PWD/libs/ -lqvb-linux64
|
||||
|
||||
# macOS homebrew include path
|
||||
message(" --> Adding local include folder to search path")
|
||||
@ -288,6 +288,21 @@ with_metainfo {
|
||||
INSTALLS += appdataXml
|
||||
}
|
||||
|
||||
with_backend {
|
||||
message(" --> Unlinking gRPC and protobuf library.")
|
||||
LIBS -= -lgrpc++ -lprotobuf -lgrpc
|
||||
|
||||
linux-g++ {
|
||||
message(" --> Linking libqvb static library.")
|
||||
LIBS += -L$$PWD/libs/ -lqvb-linux64
|
||||
}
|
||||
|
||||
macx-g++ {
|
||||
message(" --> Linking libqvb static library.")
|
||||
LIBS += -L$$PWD/libs/ -lqvb-darwin
|
||||
}
|
||||
}
|
||||
|
||||
message(" ")
|
||||
message("Done configuring Qv2ray project. Build output will be at:" $$OUT_PWD)
|
||||
message("Type `make` or `mingw32-make` to start building Qv2ray")
|
||||
|
Loading…
Reference in New Issue
Block a user