summaryrefslogtreecommitdiff
blob: 498ad9b78ac084cb35b8c8877e2688a9ca4a949e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
http://paraview.org/Bug/view.php?id=13656

---
 ParaViewCore/ServerImplementation/Core/CMakeLists.txt | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/ParaViewCore/ServerImplementation/Core/CMakeLists.txt b/ParaViewCore/ServerImplementation/Core/CMakeLists.txt
index 5ca5168..2a7ff4b 100644
--- a/ParaViewCore/ServerImplementation/Core/CMakeLists.txt
+++ b/ParaViewCore/ServerImplementation/Core/CMakeLists.txt
@@ -82,15 +82,23 @@ set (${vtk-module}_HDRS
 #------------------------------------------------------------------------------
 # Generate the protbuf message file.
 #------------------------------------------------------------------------------
+if (VTK_USE_SYSTEM_PROTOBUF)
+    set (_PROTOC_COMPILER protoc)
+    set (_PROTOC_DEPEND "")
+else()
+    set (_PROTOC_COMPILER protoc_compiler)
+    set (_PROTOC_DEPEND ${_PROTOC_COMPILER})
+endif()
+
 add_custom_command(
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.h
            ${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.cc
     
-    COMMAND protoc_compiler
+    COMMAND ${_PROTOC_COMPILER}
            "--cpp_out=dllexport_decl=VTKPVSERVERIMPLEMENTATIONCORE_EXPORT:${CMAKE_CURRENT_BINARY_DIR}"
            --proto_path "${CMAKE_CURRENT_SOURCE_DIR}"
            "${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto"
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto protoc_compiler
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto ${_PROTOC_DEPEND}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
 
-- 
2.0.5