@mobrowser/native 2.13.0 → 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.
@@ -229,16 +229,23 @@ else ()
229
229
  set(_protoc_depend protoc)
230
230
  endif ()
231
231
 
232
- add_custom_command(
233
- OUTPUT ${GENERATED_SOURCES}
234
- COMMAND "${_protoc_command}"
235
- ${PROTOC_ARGS}
236
- --cpp_out=${PROJECT_SOURCE_DIR}/src/native/gen
237
- --plugin=protoc-gen-rpc=${CC_NATIVEGEN_PLUGIN}
238
- --rpc_out=${PROJECT_SOURCE_DIR}/src/native/gen
239
- ${PROTO_FILES}
240
- DEPENDS ${PROTO_FILES} ${_protoc_depend} ${CC_NATIVEGEN_PLUGIN}
241
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
242
- COMMENT "Generating C++ sources from .proto files"
243
- VERBATIM
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 ()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobrowser/native",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "Configuration files for MōBrowser native integration",
5
5
  "main": "cmake/MoBrowser.cmake",
6
6
  "files": [