using grpc by default

This commit is contained in:
Guobang Bi 2020-03-07 16:07:54 +08:00
parent 78e428223c
commit dc8e2a1bea
No known key found for this signature in database
GPG Key ID: D850BE43BE29325B
2 changed files with 4 additions and 3 deletions

View File

@ -99,7 +99,7 @@ jobs:
cd build cd build
export _QV2RAY_BUILD_INFO_="Qv2ray built from Github Action" export _QV2RAY_BUILD_INFO_="Qv2ray built from Github Action"
export _QV2RAY_BUILD_EXTRA_INFO_="qt${{ matrix.qt_version }}-${{ github.sha }}" export _QV2RAY_BUILD_EXTRA_INFO_="qt${{ matrix.qt_version }}-${{ github.sha }}"
cmake .. -DUSE_GRPC=ON cmake ..
- name: Linux - ${{ matrix.qt_version }} - Generate Dependencies and Makefile - name: Linux - ${{ matrix.qt_version }} - Generate Dependencies and Makefile
if: matrix.platform == 'ubuntu-16.04' if: matrix.platform == 'ubuntu-16.04'
@ -112,7 +112,7 @@ jobs:
cd build cd build
export _QV2RAY_BUILD_INFO_="Qv2ray built from Github Action" export _QV2RAY_BUILD_INFO_="Qv2ray built from Github Action"
export _QV2RAY_BUILD_EXTRA_INFO_="qt${{ matrix.qt_version }}-${{ github.sha }}" export _QV2RAY_BUILD_EXTRA_INFO_="qt${{ matrix.qt_version }}-${{ github.sha }}"
cmake .. -DUSE_GRPC=ON cmake ..
#qmake .. CONFIG+="debug_and_release no_increase_build_number" PREFIX=/usr #qmake .. CONFIG+="debug_and_release no_increase_build_number" PREFIX=/usr
# -------------------------------------------------------- Build # -------------------------------------------------------- Build
- name: Build Qv2ray - name: Build Qv2ray

View File

@ -1,4 +1,4 @@
if(USE_GRPC) if(NOT USE_LIBQVB)
find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin) find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin)
find_library(GRPC_LIBRARY NAMES grpc) find_library(GRPC_LIBRARY NAMES grpc)
@ -31,6 +31,7 @@ if(USE_GRPC)
DEPENDS "${API_PROTO}" DEPENDS "${API_PROTO}"
) )
else() else()
add_definitions(-DBACKEND_LIBQVB)
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
set(QV2RAY_BACKEND_LIBRARIES ${CMAKE_SOURCE_DIR}/libs/libqvb-linux64.a) set(QV2RAY_BACKEND_LIBRARIES ${CMAKE_SOURCE_DIR}/libs/libqvb-linux64.a)
elseif(APPLE) elseif(APPLE)