@@ -6,15 +6,15 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
6
6
set_property (GLOBAL PROPERTY USE_FOLDERS ON )
7
7
set (CMAKE_MAP_IMPORTED_CONFIG_DebWithRelDeps "DebWithRelDeps;Release;" )
8
8
9
- set (Boost_NO_WARN_NEW_VERSIONS 1 )
10
- set (CMAKE_EXPORT_COMPILE_COMMANDS 1 )
9
+ set (Boost_NO_WARN_NEW_VERSIONS ON )
10
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
11
11
12
12
option (USE_MAADEPS "use third-party libraries built by MaaDeps" ON )
13
13
14
14
option (WITH_ADB_CONTROLLER "build with adb controller" ON )
15
- option (WITH_THRIFT_CONTROLLER "build with thrift controller" ON )
16
- option (WITH_DBG_CONTROLLER "build with debugging controller" ON )
17
15
option (WITH_WIN32_CONTROLLER "build with win32 controller" ON )
16
+ option (WITH_DBG_CONTROLLER "build with debugging controller" ON )
17
+ option (WITH_THRIFT_CONTROLLER "build with thrift controller" OFF )
18
18
19
19
option (WITH_GRPC "build with protobuf and grpc" OFF )
20
20
@@ -42,22 +42,21 @@ if(NOT WITH_GRPC)
42
42
set (BUILD_GRPC_CLI OFF )
43
43
set (BUILD_GRPC_TESTING OFF )
44
44
endif ()
45
+
45
46
if (NOT WITH_DBG_CONTROLLER)
46
47
message (STATUS "Dbg controller is disabled, disable BUILD_PIPELINE_TESTING" )
47
48
set (BUILD_PIPELINE_TESTING OFF )
48
49
endif ()
50
+
49
51
if (WITH_WIN32_CONTROLLER AND NOT WIN32 )
50
52
message (STATUS "Not on Windows, disable WITH_WIN32_CONTROLLER" )
51
53
set (WITH_WIN32_CONTROLLER OFF )
52
54
endif ()
53
- if (WITH_THRIFT_CONTROLLER AND MAA_CROSSCOMPILE)
54
- message (STATUS "Cross-compiling, disable WITH_THRIFT_CONTROLLER" )
55
- set (WITH_THRIFT_CONTROLLER OFF )
56
- endif ()
57
55
58
56
if (WITH_THRIFT_CONTROLLER)
59
57
include (${PROJECT_SOURCE_DIR} /cmake/thrift-gen.cmake)
60
58
endif ()
59
+
61
60
if (WITH_GRPC)
62
61
include (${PROJECT_SOURCE_DIR} /cmake/grpc-gen.cmake)
63
62
endif ()
@@ -67,9 +66,11 @@ find_package(Boost REQUIRED COMPONENTS system)
67
66
find_package (ZLIB REQUIRED)
68
67
find_package (fastdeploy_ppocr REQUIRED)
69
68
find_package (ONNXRuntime)
69
+
70
70
if (WITH_THRIFT_CONTROLLER)
71
71
find_package (Thrift CONFIG REQUIRED)
72
72
endif ()
73
+
73
74
if (WITH_GRPC)
74
75
find_package (protobuf CONFIG REQUIRED)
75
76
find_package (gRPC CONFIG REQUIRED)
@@ -82,13 +83,16 @@ add_subdirectory(tools)
82
83
if (BUILD_SAMPLE)
83
84
add_subdirectory (sample/cpp)
84
85
endif ()
86
+
85
87
if (BUILD_PIPELINE_TESTING)
86
88
add_subdirectory (test /pipeline)
87
89
add_subdirectory (test /TestingDataSet)
88
90
endif ()
91
+
89
92
if (BUILD_GRPC_TESTING)
90
93
add_subdirectory (test /grpc)
91
94
endif ()
95
+
92
96
if (BUILD_DLOPEN_TESTING)
93
97
add_subdirectory (test /dlopen)
94
98
endif ()
0 commit comments