Skip to content

Commit

Permalink
ci: fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-para committed Oct 11, 2023
1 parent fbc459b commit e1aa418
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ include(${PROJECT_SOURCE_DIR}/cmake/version.cmake)

if(WITH_THRIFT AND NOT MAA_CROSSCOMPILE)
include(${PROJECT_SOURCE_DIR}/cmake/thrift-gen.cmake)
add_compile_definitions(WITH_THRIFT)
endif()
if(WITH_GRPC)
include(${PROJECT_SOURCE_DIR}/cmake/grpc-gen.cmake)
add_compile_definitions(WITH_GRPC)
endif()

find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs)
Expand Down
8 changes: 0 additions & 8 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ elseif(UNIX)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
endif()

if(WITH_THRIFT)
add_compile_definitions(WITH_THRIFT)
endif(WITH_THRIFT)

if(WITH_GRPC)
add_compile_definitions(WITH_GRPC)
endif(WITH_GRPC)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Expand Down
4 changes: 2 additions & 2 deletions source/MaaFramework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ target_include_directories(
target_compile_definitions(MaaFramework PRIVATE MAA_FRAMEWORK_EXPORTS)

target_link_libraries(MaaFramework MaaControlUnit MaaUtils)
if(WITH_THRIFT)
if(WITH_THRIFT AND NOT MAA_CROSSCOMPILE)
target_link_libraries(MaaFramework MaaThriftController)
endif(WITH_THRIFT)
endif(WITH_THRIFT AND NOT MAA_CROSSCOMPILE)
target_link_libraries(MaaFramework ${OpenCV_LIBS} fastdeploy_ppocr ONNXRuntime::ONNXRuntime HeaderOnlyLibraries)

# clang 15之后有ranges if (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") find_package(range-v3 REQUIRED)
Expand Down

0 comments on commit e1aa418

Please sign in to comment.