mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-18 18:00:25 +08:00
update
This commit is contained in:
parent
79eb753d4b
commit
40879fe7a6
9
.github/workflows/build-qv2ray-cmake.yml
vendored
9
.github/workflows/build-qv2ray-cmake.yml
vendored
@ -88,12 +88,19 @@ jobs:
|
||||
if: matrix.platform == 'windows-latest'
|
||||
run: |
|
||||
curl -o ./libs/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z -L https://github.com/Qv2ray/Qv2ray-deps/releases/download/release/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z
|
||||
- name: Win-${{ matrix.arch }} - Build preparation - Extract Dependencies
|
||||
curl -o ./libs/Qv2ray-deps-libiconv-${{ matrix.arch }}-windows.7z -L https://github.com/Qv2ray/Qv2ray-deps/releases/download/release/Qv2ray-deps-libiconv-${{ matrix.arch }}-windows.7z
|
||||
- name: Win-${{ matrix.arch }} - gRPC- Build preparation - Extract Dependencies
|
||||
if: matrix.platform == 'windows-latest'
|
||||
uses: DuckSoft/extract-7z-action@v1.0
|
||||
with:
|
||||
pathSource: ./libs/Qv2ray-deps-grpc-${{ matrix.arch }}-windows.7z
|
||||
pathTarget: ./libs
|
||||
- name: Win-${{ matrix.arch }} - Iconv- Build preparation - Extract Dependencies
|
||||
if: matrix.platform == 'windows-latest'
|
||||
uses: DuckSoft/extract-7z-action@v1.0
|
||||
with:
|
||||
pathSource: ./libs/Qv2ray-deps-libiconv-${{ matrix.arch }}-windows.7z
|
||||
pathTarget: ./libs
|
||||
# ========================================================================================================= Generate MakeFile and Build
|
||||
- name: macOS - ${{ matrix.qt_version }} - Generate Dependencies and Build
|
||||
shell: bash
|
||||
|
@ -42,6 +42,7 @@ message(" ")
|
||||
if(WIN32)
|
||||
add_compile_options("/std:c++17")
|
||||
add_definitions(-D_HAS_STD_BYTE=0 -D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS)
|
||||
include(cmake/iconv.cmake)
|
||||
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
||||
if(CMAKE_CL_64)
|
||||
include(${CMAKE_SOURCE_DIR}/libs/x64-windows/scripts/buildsystems/vcpkg.cmake)
|
||||
@ -58,20 +59,14 @@ include(cmake/qzxing.cmake)
|
||||
include(cmake/protobuf.cmake)
|
||||
include(cmake/cpp-httplib.cmake)
|
||||
include(cmake/backend.cmake)
|
||||
|
||||
if(APPLE)
|
||||
find_package(Iconv REQUIRED)
|
||||
include(cmake/iconv.cmake)
|
||||
set(MACOSX_FRAMEWORK
|
||||
"-framework Carbon"
|
||||
"-framework Cocoa"
|
||||
"-framework Security"
|
||||
)
|
||||
set(MACOSX_ICONV_LIBRARY
|
||||
Iconv::Iconv
|
||||
)
|
||||
|
||||
set(MACOSX_ICONV_INCLUDE_PATH
|
||||
${Iconv_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{_QV2RAY_BUILD_INFO_})
|
||||
@ -173,7 +168,7 @@ add_executable(${PROJECT_NAME}
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
${QT_LIBRARY}
|
||||
${MACOSX_FRAMEWORK}
|
||||
${MACOSX_ICONV_LIBRARY}
|
||||
${ICONV_LIBRARY}
|
||||
${QV2RAY_PROTOBUF_LIBRARY}
|
||||
${QV2RAY_BACKEND_LIBRARIES}
|
||||
)
|
||||
@ -188,7 +183,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
${QZXING_INCLUDE_PATH}
|
||||
${SINGLEAPPLICATION_DIR}
|
||||
${Protobuf_INCLUDE_DIRS}
|
||||
${MACOSX_ICONV_INCLUDE_PATH}
|
||||
${ICONV_INCLUDE_PATH}
|
||||
${cpp-httplib_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
7
cmake/iconv.cmake
Normal file
7
cmake/iconv.cmake
Normal file
@ -0,0 +1,7 @@
|
||||
find_package(Iconv REQUIRED)
|
||||
set(ICONV_LIBRARY
|
||||
Iconv::Iconv
|
||||
)
|
||||
set(ICONV_INCLUDE_PATH
|
||||
${Iconv_INCLUDE_DIR}
|
||||
)
|
@ -1,4 +1,7 @@
|
||||
find_package(Protobuf REQUIRED)
|
||||
if(MSVC)
|
||||
set(Protobuf_USE_STATIC_LIBS ON)
|
||||
endif()
|
||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${CMAKE_SOURCE_DIR}/tools/v2ray_geosite.proto)
|
||||
set(QV2RAY_PROTOBUF_LIBRARY
|
||||
protobuf::libprotobuf
|
||||
|
Loading…
Reference in New Issue
Block a user