From 5e23bd55789785319ec236e306901e48c5766bfe Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Mon, 20 May 2019 15:28:07 +0200 Subject: [PATCH] #4427 Add proto files to IDE project --- ApplicationCode/CMakeLists.txt | 2 +- ApplicationCode/GrpcInterface/CMakeLists.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index 0167332191..6fab5e36ce 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -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) diff --git a/ApplicationCode/GrpcInterface/CMakeLists.cmake b/ApplicationCode/GrpcInterface/CMakeLists.cmake index 33cb451201..86f489db42 100644 --- a/ApplicationCode/GrpcInterface/CMakeLists.cmake +++ b/ApplicationCode/GrpcInterface/CMakeLists.cmake @@ -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} ) \ No newline at end of file