Commit 357e6a40 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Fixed Windows export issues for protobuf.

parent e33a1f47
......@@ -207,11 +207,13 @@ FUNCTION (protobuf_generate out_cpp_file in_proto_file)
GET_FILENAME_COMPONENT(basename ${in_proto_file} NAME_WE)
GET_FILENAME_COMPONENT(absolute ${in_proto_file} ABSOLUTE)
GET_FILENAME_COMPONENT(path ${absolute} PATH)
SET (out_file ${CMAKE_CURRENT_BINARY_DIR}/${basename}.pb.cc)
SET (out_file ${CMAKE_CURRENT_BINARY_DIR}/${basename}.pb.h)
SET(${out_cpp_file} ${out_file} PARENT_SCOPE)
ADD_CUSTOM_COMMAND(
OUTPUT ${out_file}
COMMAND protoc_compiler --cpp_out=${CMAKE_CURRENT_BINARY_DIR} --proto_path ${path} ${absolute}
COMMAND protoc_compiler
--cpp_out=dllexport_decl=VTK_EXPORT:${CMAKE_CURRENT_BINARY_DIR}
--proto_path ${path} ${absolute}
DEPENDS ${in_proto_file} protoc_compiler
)
ENDFUNCTION (protobuf_generate)
......@@ -215,6 +215,7 @@ ENDIF (PARAVIEW_ENABLE_PYTHON)
VTK_ADD_LIBRARY(vtk${KIT}
${protobuf_generated_files}
${Kit_SRCS}
vtkPVMessage.cxx
${KitInstantiator_SRCS}
)
TARGET_LINK_LIBRARIES(vtk${KIT}
......
/*=========================================================================
Program: ParaView
Module: $RCSfile$
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkSystemIncludes.h"
#include "vtkPVMessage.pb.cc"
......@@ -26,6 +26,7 @@
#if __GNUC__
# pragma GCC diagnostic ignored "-Wsign-compare"
#endif
#include "vtkSystemIncludes.h"
#include "vtkPVMessage.pb.h"
#if __GNUC__
# pragma GCC diagnostic warning "-Wsign-compare"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment