|
|
e633ee9 |
http://paraview.org/Bug/view.php?id=13656
|
|
|
e633ee9 |
|
|
|
3959c95 |
diff -up ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt.Protobuf ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt
|
|
|
e633ee9 |
--- ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt.Protobuf 2012-11-08 07:51:51.000000000 -0700
|
|
|
e633ee9 |
+++ ParaView/ParaViewCore/ServerImplementation/Core/CMakeLists.txt 2012-11-13 15:17:53.980027098 -0700
|
|
|
e633ee9 |
@@ -81,16 +81,24 @@
|
|
|
3959c95 |
#------------------------------------------------------------------------------
|
|
|
3959c95 |
# Generate the protbuf message file.
|
|
|
3959c95 |
#------------------------------------------------------------------------------
|
|
|
3959c95 |
-get_target_property(PROTOC_LOCATION protoc_compiler LOCATION)
|
|
|
e633ee9 |
+if (VTK_USE_SYSTEM_PROTOBUF)
|
|
|
e633ee9 |
+ set (_PROTOC_COMPILER protoc)
|
|
|
e633ee9 |
+ set (_PROTOC_DEPEND "")
|
|
|
e633ee9 |
+else()
|
|
|
e633ee9 |
+ set (_PROTOC_COMPILER protoc_compiler)
|
|
|
e633ee9 |
+ set (_PROTOC_DEPEND ${_PROTOC_COMPILER})
|
|
|
e633ee9 |
+endif()
|
|
|
e633ee9 |
+
|
|
|
e633ee9 |
+get_target_property(PROTOC_LOCATION ${_PROTOC_COMPILER} LOCATION)
|
|
|
3959c95 |
add_custom_command(
|
|
|
3959c95 |
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.h
|
|
|
3959c95 |
${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.cc
|
|
|
3959c95 |
|
|
|
3959c95 |
- COMMAND protoc_compiler
|
|
|
e633ee9 |
+ COMMAND ${_PROTOC_COMPILER}
|
|
|
3959c95 |
"--cpp_out=dllexport_decl=VTKPVSERVERIMPLEMENTATIONCORE_EXPORT:${CMAKE_CURRENT_BINARY_DIR}"
|
|
|
3959c95 |
--proto_path "@CMAKE_CURRENT_SOURCE_DIR@"
|
|
|
3959c95 |
"${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto"
|
|
|
3959c95 |
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto protoc_compiler
|
|
|
e633ee9 |
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto ${_PROTOC_DEPEND}
|
|
|
3959c95 |
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
3959c95 |
)
|
|
|
3959c95 |
|
|
|
e633ee9 |
@@ -109,5 +117,9 @@
|
|
|
3959c95 |
vtk_module_library(vtkPVServerImplementationCore
|
|
|
3959c95 |
${Module_SRCS})
|
|
|
3959c95 |
|
|
|
e633ee9 |
+if (VTK_USE_SYSTEM_PROTOBUF)
|
|
|
e633ee9 |
+ target_link_libraries(vtkPVServerImplementationCore ${CMAKE_THREAD_LIBS_INIT})
|
|
|
e633ee9 |
+endif()
|
|
|
e633ee9 |
+
|
|
|
3959c95 |
add_dependencies(vtkPVServerImplementationCore
|
|
|
3959c95 |
protobuf_code_generation)
|
|
|
3959c95 |
diff -up ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf ParaView/ThirdParty/protobuf/CMakeLists.txt
|
|
|
e633ee9 |
--- ParaView/ThirdParty/protobuf/CMakeLists.txt.Protobuf 2012-11-08 07:51:51.000000000 -0700
|
|
|
e633ee9 |
+++ ParaView/ThirdParty/protobuf/CMakeLists.txt 2012-11-13 15:09:31.526673020 -0700
|
|
|
e633ee9 |
@@ -34,7 +34,7 @@
|
|
|
3959c95 |
set (PROTOBUF_INSTALL_LIB_DIR ${VTK_INSTALL_LIBRARY_DIR})
|
|
|
3959c95 |
set (PROTOBUF_INSTALL_EXPORT_NAME ${VTK_INSTALL_EXPORT_NAME})
|
|
|
3959c95 |
|
|
|
3959c95 |
-vtk_module_third_party(protobuf
|
|
|
3959c95 |
+vtk_module_third_party(Protobuf
|
|
|
3959c95 |
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/vtkprotobuf/src
|
|
|
3959c95 |
LIBRARIES protobuf
|
|
|
3959c95 |
)
|
|
|
e633ee9 |
@@ -42,10 +42,12 @@
|
|
|
3959c95 |
# protobuf exports it's build-dir targets to a custom file
|
|
|
3959c95 |
# (PROTOBUF_EXPORTS.cmake). We don't care much about that. We export
|
|
|
3959c95 |
# build-dir targets ourselves.
|
|
|
3959c95 |
-vtk_target_export(protobuf)
|
|
|
3959c95 |
-vtk_target_export(protobuf-lite)
|
|
|
3959c95 |
-if (NOT CMAKE_CROSSCOMPILING)
|
|
|
3959c95 |
- vtk_compile_tools_target_export(protoc_compiler)
|
|
|
e633ee9 |
+if (NOT VTK_USE_SYSTEM_PROTOBUF)
|
|
|
e633ee9 |
+ vtk_target_export(protobuf)
|
|
|
e633ee9 |
+ vtk_target_export(protobuf-lite)
|
|
|
e633ee9 |
+ if (NOT CMAKE_CROSSCOMPILING)
|
|
|
e633ee9 |
+ vtk_compile_tools_target_export(protoc_compiler)
|
|
|
e633ee9 |
+ endif()
|
|
|
e633ee9 |
endif()
|
|
|
3959c95 |
|
|
|
3959c95 |
# All these exports don't add any install rules. However we make protobuf itself
|