Skip to content

Commit

Permalink
ci: some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-para committed Oct 11, 2023
1 parent 7510d54 commit 89bf891
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ option(BUILD_SAMPLE "build a demo" OFF)
option(WITH_THRIFT "build with thrift" ON)
option(WITH_GRPC "build with protobuf and grpc" ON)

if(USE_MAADEPS)
include(${PROJECT_SOURCE_DIR}/MaaDeps/maadeps.cmake)
endif()

# Basic compile and link configuration
include(${PROJECT_SOURCE_DIR}/cmake/config.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
Expand All @@ -25,9 +29,6 @@ if(WITH_GRPC)
include(${PROJECT_SOURCE_DIR}/cmake/grpc-gen.cmake)
endif()

if(USE_MAADEPS)
include(${PROJECT_SOURCE_DIR}/MaaDeps/maadeps.cmake)
endif()
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs)
find_package(Boost REQUIRED COMPONENTS system)
find_package(ZLIB REQUIRED)
Expand All @@ -37,7 +38,7 @@ if(WITH_THRIFT)
find_package(Thrift CONFIG REQUIRED)
endif()
if(WITH_GRPC)
find_package(protobuf CONFIG) # protoc cannot been found on arm
find_package(protobuf CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/thrift-gen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ macro(GENERATE_THRIFT_LIB LIB_NAME FILENAME OUTPUTDIR SOURCES)
execute_process(COMMAND ${THRIFT_COMPILER} --gen cpp:no_skeleton -out ${OUTPUTDIR} ${FILENAME}
RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
message(FATAL_ERROR "Error generating ${FILENAME} with generator ${GENERATOR}")
message("Error generating ${FILENAME} with generator ${GENERATOR}")
endif()
file(GLOB_RECURSE GENERATED_SOURCES ${OUTPUTDIR}/*.cpp)
add_library(${LIB_NAME} STATIC ${GENERATED_SOURCES})
Expand Down
3 changes: 3 additions & 0 deletions cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ else()
set(MAADEPS_HOST_TRIPLET "x64-linux")
endif()
set(MAADEPS_HOST_TOOLS ${PROJECT_SOURCE_DIR}/MaaDeps/vcpkg/installed/${MAADEPS_HOST_TRIPLET}/tools)
if(NOT DEFINED MAADEPS_TRIPLET)
detect_maadeps_triplet(MAADEPS_TRIPLET)
endif()
set(MAADEPS_TARGET_TOOLS ${PROJECT_SOURCE_DIR}/MaaDeps/vcpkg/installed/${MAADEPS_TRIPLET}/tools)

0 comments on commit 89bf891

Please sign in to comment.