@mobrowser/native 2.13.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cmake/Protobuf.cmake +20 -13
- package/package.json +1 -1
package/cmake/Protobuf.cmake
CHANGED
|
@@ -229,16 +229,23 @@ else ()
|
|
|
229
229
|
set(_protoc_depend protoc)
|
|
230
230
|
endif ()
|
|
231
231
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
232
|
+
# A native module without any .proto file is valid: the module is added before
|
|
233
|
+
# its first service is declared, or all of them have been removed. There is
|
|
234
|
+
# nothing for protoc to do then, and add_custom_command rejects an empty OUTPUT.
|
|
235
|
+
if (PROTO_FILES)
|
|
236
|
+
add_custom_command(
|
|
237
|
+
OUTPUT ${GENERATED_SOURCES}
|
|
238
|
+
COMMAND "${_protoc_command}"
|
|
239
|
+
${PROTOC_ARGS}
|
|
240
|
+
--cpp_out=${PROJECT_SOURCE_DIR}/src/native/gen
|
|
241
|
+
--plugin=protoc-gen-rpc=${CC_NATIVEGEN_PLUGIN}
|
|
242
|
+
--rpc_out=${PROJECT_SOURCE_DIR}/src/native/gen
|
|
243
|
+
${PROTO_FILES}
|
|
244
|
+
DEPENDS ${PROTO_FILES} ${_protoc_depend} ${CC_NATIVEGEN_PLUGIN}
|
|
245
|
+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
246
|
+
COMMENT "Generating C++ sources from .proto files"
|
|
247
|
+
VERBATIM
|
|
248
|
+
)
|
|
249
|
+
else ()
|
|
250
|
+
message(STATUS "No .proto files in ${PROTO_DIR}; skipping C++ code generation")
|
|
251
|
+
endif ()
|