|
@@ -15,6 +15,11 @@ function(add_wellknowntype type_name)
|
|
set(lookup_dirs "${QT_PROTOBUF_SOURCE_DIR}/3rdparty/grpc/third_party/protobuf/src"
|
|
set(lookup_dirs "${QT_PROTOBUF_SOURCE_DIR}/3rdparty/grpc/third_party/protobuf/src"
|
|
${Protobuf_INCLUDE_DIRS}
|
|
${Protobuf_INCLUDE_DIRS}
|
|
)
|
|
)
|
|
|
|
+
|
|
|
|
+ set(qml_enabled "")
|
|
|
|
+ if(TARGET Qt5::Qml)
|
|
|
|
+ set(qml_enabled QML)
|
|
|
|
+ endif()
|
|
foreach(dir ${lookup_dirs})
|
|
foreach(dir ${lookup_dirs})
|
|
file(GLOB PROTO_FILE "${dir}/google/protobuf/${type_name}.proto")
|
|
file(GLOB PROTO_FILE "${dir}/google/protobuf/${type_name}.proto")
|
|
if(NOT "${PROTO_FILE}" STREQUAL "")
|
|
if(NOT "${PROTO_FILE}" STREQUAL "")
|
|
@@ -24,7 +29,7 @@ function(add_wellknowntype type_name)
|
|
OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated"
|
|
OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated"
|
|
PROTO_FILES "${PROTO_FILE}"
|
|
PROTO_FILES "${PROTO_FILE}"
|
|
PROTO_INCLUDES "-I\"${dir}\""
|
|
PROTO_INCLUDES "-I\"${dir}\""
|
|
- QML
|
|
|
|
|
|
+ ${qml_enabled}
|
|
FOLDER
|
|
FOLDER
|
|
${extra_type_libraries_options}
|
|
${extra_type_libraries_options}
|
|
)
|
|
)
|