#4427 Add proto files to IDE project

This commit is contained in:
Gaute Lindkvist 2019-05-20 15:28:07 +02:00
parent 1a7d5781d8
commit 5e23bd5578
2 changed files with 4 additions and 1 deletions

View File

@ -324,7 +324,6 @@ elseif (APPLE)
endif()
set( EXE_FILES
${EXE_FILES}
${GRPC_HEADER_FILES}
${CPP_SOURCES}
${MOC_SOURCE_FILES}
${FORM_FILES_CPP}
@ -343,6 +342,7 @@ if (RESINSIGHT_ENABLE_GRPC)
${GRPC_CPP_SOURCES}
${GRPC_HEADER_FILES}
${GRPC_PYTHON_SOURCES_FULL_PATH}
${GRPC_PROTO_FILES_FULL_PATH}
Adm/RiaVersionInfo.py.cmake
)
if (DEFINED GRPC_LIBRARY_DIRS)

View File

@ -83,6 +83,8 @@ foreach(proto_file ${PROTO_FILES})
get_filename_component(rips_proto "${CMAKE_CURRENT_LIST_DIR}/GrpcProtos/${proto_file}.proto" ABSOLUTE)
get_filename_component(rips_proto_path "${rips_proto}" PATH)
list(APPEND GRPC_PROTO_FILES_FULL_PATH ${rips_proto})
set(rips_proto_srcs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.pb.cc")
set(rips_proto_hdrs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.pb.h")
set(rips_grpc_srcs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.grpc.pb.cc")
@ -160,3 +162,4 @@ list ( APPEND GRPC_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
list ( APPEND GRPC_CPP_SOURCES ${SOURCE_GROUP_SOURCE_FILES})
source_group( "GrpcInterface" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.cmake )
source_group( "GrpcInterface\\GrpcProtos" FILES ${GRPC_PROTO_FILES_FULL_PATH} )